[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] linux-2.6.18: make various _ATTR() definitions static
This is to not pollute the global name space, particularly when the affected components get built into the base kernel. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- a/drivers/xen/blktap2/sysfs.c +++ b/drivers/xen/blktap2/sysfs.c @@ -37,9 +37,9 @@ blktap_sysfs_exit(struct blktap *tap) } static ssize_t blktap_sysfs_pause_device(struct class_device *, const char *, size_t); -CLASS_DEVICE_ATTR(pause, S_IWUSR, NULL, blktap_sysfs_pause_device); +static CLASS_DEVICE_ATTR(pause, S_IWUSR, NULL, blktap_sysfs_pause_device); static ssize_t blktap_sysfs_resume_device(struct class_device *, const char *, size_t); -CLASS_DEVICE_ATTR(resume, S_IWUSR, NULL, blktap_sysfs_resume_device); +static CLASS_DEVICE_ATTR(resume, S_IWUSR, NULL, blktap_sysfs_resume_device); static ssize_t blktap_sysfs_set_name(struct class_device *dev, const char *buf, size_t size) @@ -97,8 +97,8 @@ blktap_sysfs_get_name(struct class_devic return size; } -CLASS_DEVICE_ATTR(name, S_IRUSR | S_IWUSR, - blktap_sysfs_get_name, blktap_sysfs_set_name); +static CLASS_DEVICE_ATTR(name, S_IRUSR | S_IWUSR, + blktap_sysfs_get_name, blktap_sysfs_set_name); static ssize_t blktap_sysfs_remove_device(struct class_device *dev, @@ -117,7 +117,7 @@ blktap_sysfs_remove_device(struct class_ return (err ? : size); } -CLASS_DEVICE_ATTR(remove, S_IWUSR, NULL, blktap_sysfs_remove_device); +static CLASS_DEVICE_ATTR(remove, S_IWUSR, NULL, blktap_sysfs_remove_device); static ssize_t blktap_sysfs_pause_device(struct class_device *dev, @@ -285,7 +285,7 @@ out: return ret; } -CLASS_DEVICE_ATTR(debug, S_IRUSR, blktap_sysfs_debug_device, NULL); +static CLASS_DEVICE_ATTR(debug, S_IRUSR, blktap_sysfs_debug_device, NULL); int blktap_sysfs_create(struct blktap *tap) @@ -365,8 +365,8 @@ blktap_sysfs_set_verbosity(struct class return -EINVAL; } -CLASS_ATTR(verbosity, S_IRUSR | S_IWUSR, - blktap_sysfs_show_verbosity, blktap_sysfs_set_verbosity); +static CLASS_ATTR(verbosity, S_IRUSR | S_IWUSR, + blktap_sysfs_show_verbosity, blktap_sysfs_set_verbosity); static ssize_t blktap_sysfs_show_devices(struct class *class, char *buf) @@ -391,7 +391,7 @@ blktap_sysfs_show_devices(struct class * return ret; } -CLASS_ATTR(devices, S_IRUSR, blktap_sysfs_show_devices, NULL); +static CLASS_ATTR(devices, S_IRUSR, blktap_sysfs_show_devices, NULL); void blktap_sysfs_free(void) --- a/drivers/xen/pciback/pci_stub.c +++ b/drivers/xen/pciback/pci_stub.c @@ -995,8 +995,7 @@ static ssize_t pcistub_slot_add(struct d err = count; return err; } - -DRIVER_ATTR(new_slot, S_IWUSR, NULL, pcistub_slot_add); +static DRIVER_ATTR(new_slot, S_IWUSR, NULL, pcistub_slot_add); static ssize_t pcistub_slot_remove(struct device_driver *drv, const char *buf, size_t count) @@ -1015,8 +1014,7 @@ static ssize_t pcistub_slot_remove(struc err = count; return err; } - -DRIVER_ATTR(remove_slot, S_IWUSR, NULL, pcistub_slot_remove); +static DRIVER_ATTR(remove_slot, S_IWUSR, NULL, pcistub_slot_remove); static ssize_t pcistub_slot_show(struct device_driver *drv, char *buf) { @@ -1039,8 +1037,7 @@ static ssize_t pcistub_slot_show(struct return count; } - -DRIVER_ATTR(slots, S_IRUSR, pcistub_slot_show, NULL); +static DRIVER_ATTR(slots, S_IRUSR, pcistub_slot_show, NULL); static ssize_t pcistub_quirk_add(struct device_driver *drv, const char *buf, size_t count) @@ -1104,8 +1101,7 @@ static ssize_t pcistub_quirk_show(struct return count; } - -DRIVER_ATTR(quirks, S_IRUSR | S_IWUSR, pcistub_quirk_show, pcistub_quirk_add); +static DRIVER_ATTR(quirks, S_IRUSR | S_IWUSR, pcistub_quirk_show, pcistub_quirk_add); static ssize_t permissive_add(struct device_driver *drv, const char *buf, size_t count) @@ -1170,8 +1166,7 @@ static ssize_t permissive_show(struct de spin_unlock_irqrestore(&pcistub_devices_lock, flags); return count; } - -DRIVER_ATTR(permissive, S_IRUSR | S_IWUSR, permissive_show, permissive_add); +static DRIVER_ATTR(permissive, S_IRUSR | S_IWUSR, permissive_show, permissive_add); #ifdef CONFIG_PCI_MSI --- a/drivers/xen/usbback/usbstub.c +++ b/drivers/xen/usbback/usbstub.c @@ -280,8 +280,7 @@ static ssize_t usbstub_show_portids(stru return count; } - -DRIVER_ATTR(port_ids, S_IRUSR, usbstub_show_portids, NULL); +static DRIVER_ATTR(port_ids, S_IRUSR, usbstub_show_portids, NULL); /* table of devices that matches any usbdevice */ static struct usb_device_id usbstub_table[] = { --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -499,7 +499,8 @@ static ssize_t xendev_show_nodename(stru { return sprintf(buf, "%s\n", to_xenbus_device(dev)->nodename); } -DEVICE_ATTR(nodename, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_nodename, NULL); +static DEVICE_ATTR(nodename, S_IRUSR | S_IRGRP | S_IROTH, + xendev_show_nodename, NULL); static ssize_t xendev_show_devtype(struct device *dev, #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) @@ -509,7 +510,8 @@ static ssize_t xendev_show_devtype(struc { return sprintf(buf, "%s\n", to_xenbus_device(dev)->devicetype); } -DEVICE_ATTR(devtype, S_IRUSR | S_IRGRP | S_IROTH, xendev_show_devtype, NULL); +static DEVICE_ATTR(devtype, S_IRUSR | S_IRGRP | S_IROTH, + xendev_show_devtype, NULL); int xenbus_probe_node(struct xen_bus_type *bus, Attachment:
xen-static-attrs.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |