diff options
| -rw-r--r-- | d1.patch | 34 | ||||
| -rw-r--r-- | driver-core-add-device_attr_rw-and-device_attr_ro-macros.patch | 4 |
2 files changed, 30 insertions, 8 deletions
diff --git a/d1.patch b/d1.patch index 8855ad8f4afaba..2cc1d2ba2d6a4f 100644 --- a/d1.patch +++ b/d1.patch @@ -20,13 +20,13 @@ Subject: meta-patch of all of the dev_attr conversions drivers/staging/comedi/comedi_fops.c | 27 +++++----- drivers/uio/uio.c | 16 +++-- drivers/video/backlight/backlight.c | 26 +++++---- - drivers/video/output.c | 12 ++-- + drivers/video/output.c | 20 +++---- include/linux/device.h | 3 - include/linux/pps_kernel.h | 2 mm/backing-dev.c | 22 +++++--- net/core/net-sysfs.c | 94 ++++++++++++++++++++--------------- net/rfkill/core.c | 38 +++++++------- - 23 files changed, 362 insertions(+), 227 deletions(-) + 23 files changed, 365 insertions(+), 232 deletions(-) --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1023,16 +1023,38 @@ Subject: meta-patch of all of the dev_attr conversions } --- a/drivers/video/output.c +++ b/drivers/video/output.c -@@ -62,6 +62,8 @@ static ssize_t video_output_store_state( +@@ -32,8 +32,8 @@ MODULE_DESCRIPTION("Display Output Switc + MODULE_LICENSE("GPL"); + MODULE_AUTHOR("Luming Yu <luming.yu@intel.com>"); + +-static ssize_t video_output_show_state(struct device *dev, +- struct device_attribute *attr, char *buf) ++static ssize_t state_show(struct device *dev, struct device_attribute *attr, ++ char *buf) + { + ssize_t ret_size = 0; + struct output_device *od = to_output_device(dev); +@@ -42,9 +42,8 @@ static ssize_t video_output_show_state(s + return ret_size; + } + +-static ssize_t video_output_store_state(struct device *dev, +- struct device_attribute *attr, +- const char *buf,size_t count) ++static ssize_t state_store(struct device *dev, struct device_attribute *attr, ++ const char *buf,size_t count) + { + char *endp; + struct output_device *od = to_output_device(dev); +@@ -62,6 +61,7 @@ static ssize_t video_output_store_state( } return count; } -+static DEVICE_ATTR(state, 0644, video_output_show_state, -+ video_output_store_state); ++static DEVICE_ATTR_RW(state); static void video_output_release(struct device *dev) { -@@ -69,16 +71,16 @@ static void video_output_release(struct +@@ -69,16 +69,16 @@ static void video_output_release(struct kfree(od); } diff --git a/driver-core-add-device_attr_rw-and-device_attr_ro-macros.patch b/driver-core-add-device_attr_rw-and-device_attr_ro-macros.patch index 9dcdbce63fb8a1..e2e979cdd8e7aa 100644 --- a/driver-core-add-device_attr_rw-and-device_attr_ro-macros.patch +++ b/driver-core-add-device_attr_rw-and-device_attr_ro-macros.patch @@ -19,9 +19,9 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> #define DEVICE_ATTR(_name, _mode, _show, _store) \ struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) -+#define DEVICE_ATTR_RW(_name, _mode, _show, _store) \ ++#define DEVICE_ATTR_RW(_name) \ + struct device_attribute dev_attr_##_name = __ATTR_RW(_name) -+#define DEVICE_ATTR_RO(_name, _mode, _show, _store) \ ++#define DEVICE_ATTR_RO(_name) \ + struct device_attribute dev_attr_##_name = __ATTR_RO(_name) #define DEVICE_ULONG_ATTR(_name, _mode, _var) \ struct dev_ext_attribute dev_attr_##_name = \ |
