kernel-ark/drivers/platform
Frans Klaver 6fe3a77f62 eeepc-laptop: tell sysfs that the disp attribute is write-only
The disp attribute is write-only, but sysfs doesn't know this. Currently
show_sys_acpi() is mimicking sysfs behavior, if the underlying acpi call
should fail. This was introduced in 6dff29b63a "eeepc-laptop:
disp attribute should be write-only". This is not ideal; behaving like
sysfs is better left to sysfs.

Introduce EEEPC_CREATE_DEVICE_ATTR_WO() to instantiate a write-only
attribute, and declare the disp attribute with it. Sysfs makes sure
userspace can only write to disp at all times. This removes the need for
mimicking the sysfs behavior in show_sys_acpi() and store_sys_acpi(),
but we'll stick with -EIO, as changing sysfs return values should not be
taken lightly.

This change also causes EEEPC_CREATE_DEVICE_ATTR() to be used only for
R/W attributes. This enables us to drop the _mode argument from the
macro and use DEVICE_ATTR_RW() internally while we're at it. Append _RW
to the name for readability.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2014-09-19 09:42:11 -07:00
..
chrome platform/chrome: Updates for 3.17 2014-08-10 11:13:58 -07:00
goldfish goldfish: pipe: fix warnings for 32bit builds 2014-05-16 11:32:51 -07:00
olpc drivers/platform/olpc/olpc-ec.c: initialise earlier 2013-08-23 09:51:22 -07:00
x86 eeepc-laptop: tell sysfs that the disp attribute is write-only 2014-09-19 09:42:11 -07:00
Kconfig platform: add chrome platform directory 2013-11-20 18:51:03 -05:00
Makefile platform: add chrome platform directory 2013-11-20 18:51:03 -05:00