Commit Graph

388395 Commits

Author SHA1 Message Date
Johannes Berg
3159269ef4 debugfs: provide debugfs_create_x64() when disabled
commit 15b0beaa33 ("Add x64 support to debugfs") added
debugfs_create_x64(), but forgot to provide it when debugfs is
disabled, causing problems when code tries to use it even then.
Provide the appropriate static inline.

Cc: Huang Ying <ying.huang@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 22:09:12 -07:00
Greg Kroah-Hartman
b15a21ddda rbd: convert bus code to use bus_groups
The bus_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the RBD bus code to use the
correct field.

Cc: Yehuda Sadeh <yehuda@inktank.com>
Cc: Sage Weil <sage@inktank.com>
Acked-by: Alex Elder <elder@linaro.org>
Cc: <ceph-devel@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 22:07:49 -07:00
Greg KH
4c33dea781 firmware: dcdbas: use binary attribute groups
The dcdbas code was "hand rolling" a binary attribute group, which the
driver core now supports automatically.  So remove the "create the files
by hand" logic, and just set the proper field in the attribute group
structure, saving lots of code and headache.

Cc: Doug Warzecha <Douglas_Warzecha@dell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

--

 Doug, I can take this through my driver-core tree if you don't object.

 drivers/firmware/dcdbas.c |   19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)
2013-08-27 22:07:49 -07:00
Greg Kroah-Hartman
f799878000 sysfs: add sysfs_create/remove_groups for when SYSFS is not enabled
We need these functions for when CONFIG_SYSFS=n.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 17:24:49 -07:00
Greg Kroah-Hartman
6396768560 driver core: add #include <linux/sysfs.h> to core files.
This is needed to fix the build on sh systems.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 10:24:15 -07:00
Greg Kroah-Hartman
0d4260e04d HID: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the HID bus code to use
the correct field.

Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-26 05:04:42 -07:00
Greg Kroah-Hartman
7048f5d027 Input: serio: convert bus code to use drv_groups
The drv_attrs field of struct bus_type is going away soon, drv_groups
should be used instead.  This converts the serio bus code to use the
correct field.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-25 14:56:34 -07:00
Greg Kroah-Hartman
5e9e4911a5 Input: gameport: convert bus code to use drv_groups
The drv_attrs field of struct bus_type is going away soon, drv_groups
should be used instead.  This converts the gameport bus code to use the
correct field.

Acked: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-25 14:56:34 -07:00
Greg Kroah-Hartman
14adbe5307 driver core: firmware: use __ATTR_RW()
Use __ATTR_RW() instead of __ATTR() to make it more obvious what the
type of attribute is being created.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 17:08:48 -07:00
Greg Kroah-Hartman
c5e064a698 driver core: core: use DEVICE_ATTR_RO
Use DEVICE_ATTR_RO() instead of a "raw" __ATTR macro, making it easier
to audit exactly what is going on with the sysfs files.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 17:07:26 -07:00
Greg Kroah-Hartman
2581c9cc0d driver core: bus: use DRIVER_ATTR_WO()
There are two bus attributes that can better be defined using
DRIVER_ATTR_WO(), so convert them to the new macro, making it easier to
audit attribute permissions.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 15:04:42 -07:00
Greg Kroah-Hartman
1130c55c75 driver core: create write-only attribute macros for devices and drivers
This creates the macros DRIVER_ATTR_WO() and DEVICE_ATTR_WO() for
write-only attributes for drivers and devices.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 15:02:56 -07:00
Greg Kroah-Hartman
a65fcce75a sysfs: create __ATTR_WO()
This creates the macro __ATTR_WO() for write-only attributes, instead of
having to "open define" them.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 15:02:01 -07:00
Greg Kroah-Hartman
d06262e585 driver-core: platform: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the platform bus code to use
the correct field.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 14:43:44 -07:00
Greg Kroah-Hartman
1a6661dafd workqueue: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the workqueue bus code to use
the correct field.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 14:38:12 -07:00
Greg Kroah-Hartman
32f389ec56 MEI: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead.  This converts the MEI bus code to use
the correct field.

Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 14:38:12 -07:00
Greg Kroah-Hartman
d13a280fae USB: serial: convert bus code to use drv_groups
The drv_attrs field of struct bus_type is going away soon, drv_groups
should be used instead.  This converts the USB serial bus code to use
the correct field.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23 14:38:11 -07:00
Geert Uytterhoeven
bf2206957c Kconfig: Remove hotplug enable hints in CONFIG_KEXEC help texts
commit 40b313608a ("Finally eradicate
CONFIG_HOTPLUG") removed remaining references to CONFIG_HOTPLUG, but missed
a few plain English references in the CONFIG_KEXEC help texts.

Remove them, too.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 12:35:01 -07:00
Greg Kroah-Hartman
eefafb79a4 w1: slaves: w1_ds2781: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:44 -07:00
Greg Kroah-Hartman
0597129cdc w1: slaves: w1_ds2760: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:44 -07:00
Greg Kroah-Hartman
9365261db4 w1: slaves: w1_ds2780: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:43 -07:00
Greg Kroah-Hartman
fa33a65a9c w1: slaves: w1_ds28e04: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:43 -07:00
Greg Kroah-Hartman
38f40982e1 w1: slaves: w1_ds2433: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:43 -07:00
Greg Kroah-Hartman
b3c6061dac w1: slaves: w1_ds2431: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:43 -07:00
Greg Kroah-Hartman
94c9e6d665 w1: slaves: w1_ds2423: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:43 -07:00
Greg Kroah-Hartman
729fb9d33f w1: slaves: w1_ds2413.c: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Cc: Mariusz Bialonczyk <manio@skyboo.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:43 -07:00
Greg Kroah-Hartman
32ea4175ae w1: slaves: w1_ds2408: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:42 -07:00
Greg Kroah-Hartman
b8a9f44fea w1: slaves: w1_therm: convert to use w1_family_ops.groups
This moves the sysfs file creation/removal to the w1 core by using the
.groups field, saving code in the slave driver.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Cc: David Stevenson <david@avoncliff.com>
Cc: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Cc: Michael Arndt <michael@scriptkiller.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:42 -07:00
Greg Kroah-Hartman
36c27a655a w1: add attribute groups to struct w1_family_ops
This lets w1 slave drivers declare an attribute group, and not have to
create/destroy sysfs files directly.  All w1 slave drivers will be fixed
to use this field up in follow-on patches to this one.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 11:05:42 -07:00
Greg Kroah-Hartman
5b187b3c0e w1: use default attribute groups for w1 slave devices
As we have 2 sysfs files for the w1 slave devices, let the driver core
create / destroy them automatically by setting the default attribute
group for them, saving code and housekeeping logic.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:55:04 -07:00
Greg Kroah-Hartman
47eba33a09 w1: remove race with sysfs file creation
W1 slave sysfs files are created _after_ userspace is notified that the
device has been added to the system.  Fix that race by moving the
creation/remove of the files to the bus notifier that is there for doing
this type of thing.

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:55:03 -07:00
Greg Kroah-Hartman
3e1026b3fa sysfs.h: remove attr_name() macro
Gotta love a macro that doesn't reduce the typing you have to do.

Also, only the driver core, and one network driver uses this.  The
driver core functions will be going away soon, and I'll convert the
network driver soon to not need this as well, so delete it for now
before anyone else gets some bright ideas and wants to use it.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:25:34 -07:00
Greg Kroah-Hartman
09239ed4aa sysfs: group.c: fix up kerneldoc
Fix up the wording of sysfs_create/remove_groups() a bit.

Reported-by: Anthony Foiani <tkil@scrye.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 09:23:28 -07:00
Greg Kroah-Hartman
028718a5cc acpi: bgrt: fix build error due to attribute change
No need to call sysfs_bin_attr_init, as the attribute is not dynamically
created.  Also, we renamed the attribute, so this one isn't even valid
anymore.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Len Brown <lenb@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 08:34:39 -07:00
Greg Kroah-Hartman
5da5c9c899 sysfs: fix up minor coding style issues in sysfs.h
As long as we are cleaning up sysfs coding style issues, don't forget
the main sysfs.h file, so fix up the space issues there as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 17:47:05 -07:00
Greg Kroah-Hartman
2c3a908b4b sysfs: sysfs.h: fix coding style issues
This fixes up the remaining coding style issues in sysfs.h

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:40:05 -07:00
Greg Kroah-Hartman
07ac62a604 sysfs: file.c: fix up broken string warnings
This fixes the coding style warnings in fs/sysfs/file.c for broken
strings across lines.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:37:42 -07:00
Greg Kroah-Hartman
37814ee0ba sysfs: dir.c: fix up odd do/while indentation
This fixes up the odd do/while after an if statement warning in dir.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:36:02 -07:00
Greg Kroah-Hartman
060cc749e9 sysfs: fix up uaccess.h coding style warnings
This fixes the uaccess.h warnings in the sysfs.c files.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:34:59 -07:00
Greg Kroah-Hartman
ddfd6d074e sysfs: fix up 80 column coding style issues
This fixes up the 80 column coding style issues in the sysfs .c files.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:33:34 -07:00
Greg Kroah-Hartman
1b18dc2beb sysfs: fix up space coding style issues
This fixes up all of the space-related coding style issues for the sysfs
code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:28:26 -07:00
Greg Kroah-Hartman
ab9bf4be4d sysfs: remove trailing whitespace
This removes all trailing whitespace errors in the sysfs code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:21:17 -07:00
Greg Kroah-Hartman
1b866757fc sysfs: fix placement of EXPORT_SYMBOL()
The export should happen after the function, not at the bottom of the
file, so fix that up.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:17:47 -07:00
Greg Kroah-Hartman
9e2a47ed64 sysfs: group: update copyright to add myself and the LF
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:14:11 -07:00
Greg Kroah-Hartman
f9ae443b5a sysfs: group.c: add kerneldoc for sysfs_remove_group
sysfs_remove_group() never had kerneldoc, so add it, and fix up the
kerneldoc for sysfs_remove_groups() which didn't specify the parameters
properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:12:34 -07:00
Greg Kroah-Hartman
16aebf1c5d sysfs: group.c: fix up broken string coding style
checkpatch complains about the broken string in the file, and it's
correct, so fix it up.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:10:02 -07:00
Greg Kroah-Hartman
995d8ed943 sysfs: group.c: fix up some * coding style issues
This fixes up the * coding style warnings for the group.c sysfs file.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:07:29 -07:00
Greg Kroah-Hartman
e6c56920fd sysfs: group.c: fix trailing whitespace
There was some trailing spaces in the file, fix that up.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:06:14 -07:00
Greg Kroah-Hartman
d363bc53ef sysfs: group.c: move EXPORT_SYMBOL_GPL() to the proper location
This fixes up the coding style issue of incorrectly placing the
EXPORT_SYMBOL_GPL() macro, it should be right after the function itself,
not at the end of the file.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:04:12 -07:00
Greg Kroah-Hartman
3e9b2bae83 sysfs: add sysfs_create/remove_groups()
These functions are being open-coded in 3 different places in the driver
core, and other driver subsystems will want to start doing this as well,
so move it to the sysfs core to keep it all in one place, where we know
it is written properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21 16:02:19 -07:00