aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/setup-pci.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2008-11-30 17:10:12 -0800
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 11:12:58 -0800
commit92425a405ea482209b43093a5e35be7de02acf18 (patch)
tree0cf7d494d8a743350f29a827a272287a7d99b5d1 /drivers/ide/setup-pci.c
parent1684f5ddd4c0c754f52c78eaa2c5c69ad09fb18c (diff)
PCI: Make settable sysfs attributes more consistent
PCI devices have three settable boolean attributes, enable, broken_parity_status, and msi_bus. The store functions for these would silently interpret "0x01" as false, "1llogical" as true, and "true" would be (silently!) ignored and do nothing. This is inconsistent with typical sysfs handling of settable attributes, and just plain doesn't make much sense. So, use strict_strtoul(), which was created for this purpose. The store functions will treat a value of 0 as false, non-zero as true, and return -EINVAL for a parse failure. Additionally, is_enabled_store() and msi_bus_store() return -EPERM if CAP_SYS_ADMIN is lacking, rather than silently doing nothing. This is more typical behavior for sysfs attributes that need a capability. And msi_bus_store() will only print the "forced subordinate bus ..." warning if the MSI flag was actually forced to a different value. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/ide/setup-pci.c')
0 files changed, 0 insertions, 0 deletions