arch: (dynamic sysfs callbacks) update device attribute callbacks
Subsystems (2)
PATCH 3/12 arch: (dynamic sysfs callbacks) update device attribute callbacks
Signed-off-by Yani Ioannou <[email protected]>
---
arm/common/amba.c | 2 +- arm/kernel/ecard.c | 12 ++++++------ arm26/kernel/ecard.c | 10 +++++----- ia64/sn/kernel/tiocx.c | 4 ++-- parisc/kernel/drivers.c | 2 +- ppc/kernel/pci.c | 2 +- ppc/syslib/ocp.c | 2 +- ppc/syslib/of_device.c | 2 +- ppc64/kernel/of_device.c | 2 +- ppc64/kernel/pci.c | 2 +- ppc64/kernel/vio.c | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-)
arch/arm/common/amba.c +1 -1
@@ -169,7 +169,7 @@ static void amba_device_release(struct d } #define amba_attr(name,fmt,arg...) \ -static ssize_t show_##name(struct device *_dev, char *buf) \ +static ssize_t show_##name(struct device *_dev, char *buf, void *private) \ { \ struct amba_device *dev = to_amba_device(_dev); \ return sprintf(buf, fmt, arg); \
arch/arm/kernel/ecard.c +6 -6
@@ -866,19 +866,19 @@ static struct expansion_card *__init ecareturn ec; } -static ssize_t ecard_show_irq (struct device *dev,char *buf) +static ssize_t ecard_show_irq (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%u\n" , ec->irq); } -static ssize_t ecard_show_dma (struct device *dev,char *buf) +static ssize_t ecard_show_dma (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%u\n" , ec->dma); } -static ssize_t ecard_show_resources (struct device *dev,char *buf) +static ssize_t ecard_show_resources (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);char *str = buf;
@@ -893,19 +893,19 @@ static ssize_t ecard_show_resources(strureturn str - buf; } -static ssize_t ecard_show_vendor (struct device *dev,char *buf) +static ssize_t ecard_show_vendor (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%u\n" , ec->cid.manufacturer); } -static ssize_t ecard_show_device (struct device *dev,char *buf) +static ssize_t ecard_show_device (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%u\n" , ec->cid.product); } -static ssize_t ecard_show_type (struct device *dev,char *buf) +static ssize_t ecard_show_type (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%s\n" , ec->type ==ECARD_EASI ?"EASI" :"IOC" );
arch/arm26/kernel/ecard.c +5 -5
@@ -562,31 +562,31 @@ static void __init ecard_init_resources( } } -static ssize_t ecard_show_irq (struct device *dev,char *buf) +static ssize_t ecard_show_irq (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%u\n" , ec->irq); } -static ssize_t ecard_show_vendor (struct device *dev,char *buf) +static ssize_t ecard_show_vendor (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%u\n" , ec->cid.manufacturer); } -static ssize_t ecard_show_device (struct device *dev,char *buf) +static ssize_t ecard_show_device (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%u\n" , ec->cid.product); } -static ssize_t ecard_show_dma (struct device *dev,char *buf) +static ssize_t ecard_show_dma (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);return sprintf (buf,"%u\n" , ec->dma); } -static ssize_t ecard_show_resources (struct device *dev,char *buf) +static ssize_t ecard_show_resources (struct device *dev,char *buf,void *private) {struct expansion_card *ec =ECARD_DEV (dev);char *str = buf;
arch/ia64/sn/kernel/tiocx.c +2 -2
@@ -432,7 +432,7 @@ static int tiocx_reload(struct cx_dev *creturn cx_device_reload (cx_dev); } -static ssize_t show_cxdev_control (struct device *dev,char *buf) +static ssize_t show_cxdev_control (struct device *dev,char *buf,void *private) {struct cx_dev *cx_dev =to_cx_dev (dev);
@@ -443,7 +443,7 @@ static ssize_t show_cxdev_control(struct }static ssize_t store_cxdev_control (struct device *dev,const char *buf, -size_t count) +size_t count,void *private) {int n;struct cx_dev *cx_dev =to_cx_dev (dev);
arch/parisc/kernel/drivers.c +1 -1
@@ -466,7 +466,7 @@ static int parisc_generic_match(struct d }#define pa_dev_attr (name, field, format_string) \ -static ssize_t name##_show(struct device *dev, char *buf) \ +static ssize_t name##_show(struct device *dev, char *buf, void *private) \ { \ struct parisc_device *padev = to_parisc_device(dev); \ return sprintf(buf, format_string, padev->field); \
arch/ppc/kernel/pci.c +1 -1
@@ -1003,7 +1003,7 @@ pci_create_OF_bus_map(void) } } -static ssize_t pci_show_devspec (struct device *dev,char *buf) +static ssize_t pci_show_devspec (struct device *dev,char *buf,void *private) {struct pci_dev *pdev;struct device_node *np;
arch/ppc/syslib/ocp.c +1 -1
@@ -68,7 +68,7 @@ static int ocp_inited;/* Sysfs support */ #define OCP_DEF_ATTR (field, format_string) \ static ssize_t \ -show_##field(struct device *dev, char *buf) \ +show_##field(struct device *dev, char *buf, void *private) \ { \ struct ocp_device *odev = to_ocp_dev(dev); \ \
arch/ppc/syslib/of_device.c +1 -1
@@ -161,7 +161,7 @@ void of_unregister_driver(struct of_plat } -static ssize_t dev_show_devspec (struct device *dev,char *buf) +static ssize_t dev_show_devspec (struct device *dev,char *buf,void *private) {struct of_device *ofdev;
arch/ppc64/kernel/of_device.c +1 -1
@@ -161,7 +161,7 @@ void of_unregister_driver(struct of_plat } -static ssize_t dev_show_devspec (struct device *dev,char *buf) +static ssize_t dev_show_devspec (struct device *dev,char *buf,void *private) {struct of_device *ofdev;
arch/ppc64/kernel/pci.c +1 -1
@@ -507,7 +507,7 @@ int pci_mmap_page_range(struct pci_dev * }#ifdef CONFIG_PPC_MULTIPLATFORM -static ssize_t pci_show_devspec (struct device *dev,char *buf) +static ssize_t pci_show_devspec (struct device *dev,char *buf,void *private) {struct pci_dev *pdev;struct device_node *np;
arch/ppc64/kernel/vio.c +2 -2
@@ -300,7 +300,7 @@ static void __devinit vio_dev_release(st }#ifdef CONFIG_PPC_PSERIES -static ssize_t viodev_show_devspec (struct device *dev,char *buf) +static ssize_t viodev_show_devspec (struct device *dev,char *buf,void *private) {struct device_node *of_node = dev->platform_data;
@@ -309,7 +309,7 @@ static ssize_t viodev_show_devspec(strucDEVICE_ATTR (devspec,S_IRUSR |S_IRGRP |S_IROTH , viodev_show_devspec,NULL );#endif -static ssize_t viodev_show_name (struct device *dev,char *buf) +static ssize_t viodev_show_name (struct device *dev,char *buf,void *private) {return sprintf (buf,"%s\n" ,to_vio_dev (dev)->name); }