fbdev: uvesafb: remove DRIVER_ATTR() usage
Subsystems (2)
PATCH 1/1 fbdev: uvesafb: remove DRIVER_ATTR() usage
From: Greg Kroah-Hartman <[email protected]>
It's better to be explicit and use the DRIVER_ATTR_RW() macro when defining a driver's sysfs file. Bonus is this fixes up a checkpatch.pl warning.
This is part of a series to drop DRIVER_ATTR() from the tree entirely.
--- drivers/video/fbdev/uvesafb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/video/fbdev/uvesafb.c +3 -4
@@ -1860,19 +1860,18 @@ static int uvesafb_setup(char *options) }#endif /* !MODULE */ -static ssize_t show_v86d (struct device_driver *dev,char *buf) +static ssize_t v86d_show (struct device_driver *dev,char *buf) {return snprintf (buf,PAGE_SIZE ,"%s\n" , v86d_path); } -static ssize_t store_v86d (struct device_driver *dev,const char *buf, +static ssize_t v86d_store (struct device_driver *dev,const char *buf,size_t count) {strncpy (v86d_path, buf,PATH_MAX );return count; } - -static DRIVER_ATTR(v86d, S_IRUGO | S_IWUSR, show_v86d, store_v86d); +static DRIVER_ATTR_RW (v86d);static int uvesafb_init (void ) {
Quoted 11 lines · Greg KH
From: Greg Kroah-Hartman <[email protected]>
It's better to be explicit and use the
DRIVER_ATTR_RW()macro when defining a driver's sysfs file. Bonus is this fixes up a checkpatch.pl warning.This is part of a series to drop
DRIVER_ATTR()from the tree entirely.Cc Michal Januszewski <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
I assume that this will go through your tree with other DRIVER_ATTR() removal patches (please ping me if you want me to merge this patch through fbdev tree).
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Quoted 13 lines · Bartlomiej Zolnierkiewicz
Quoted 11 lines · Greg KH
From: Greg Kroah-Hartman <[email protected]>
It's better to be explicit and use the
DRIVER_ATTR_RW()macro when defining a driver's sysfs file. Bonus is this fixes up a checkpatch.pl warning.This is part of a series to drop
DRIVER_ATTR()from the tree entirely.Cc Michal Januszewski <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Quoted 5 lines
I assume that this will go through your tree with other
DRIVER_ATTR()removal patches (please ping me if you want me to merge this patch through fbdev tree).
I'll take it through mine, thanks.
greg k-h