]> xenbits.xensource.com Git - people/royger/linux-2.6.18-xen.git/commitdiff
xen: make various _ATTR() definitions static
authorJan Beulich <jbeulich@novell.com>
Fri, 25 Feb 2011 11:31:57 +0000 (11:31 +0000)
committerJan Beulich <jbeulich@novell.com>
Fri, 25 Feb 2011 11:31:57 +0000 (11:31 +0000)
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@novell.com>
drivers/xen/blktap2/sysfs.c
drivers/xen/pciback/pci_stub.c
drivers/xen/usbback/usbstub.c
drivers/xen/xenbus/xenbus_probe.c

index 708c1fa450e4519919cb05d1fe35a77201e7e82b..bdfeaf01087994e7371210211757916921c25ea9 100644 (file)
@@ -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_device *dev, char *buf)
 
        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_device *dev,
 
        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 *class, const char *buf, size_t size)
 
        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 *class, char *buf)
 
        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)
index c481a73fe6091fc0379e100a13e09dd258977c13..97e39f928621fbd05c18685f2f920bdb12b57e71 100644 (file)
@@ -995,8 +995,7 @@ static ssize_t pcistub_slot_add(struct device_driver *drv, const char *buf,
                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(struct device_driver *drv, const char *buf,
                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 device_driver *drv, char *buf)
 
        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 device_driver *drv, char *buf)
 
        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 device_driver *drv, char *buf)
        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
 
index 003ef0283b07dab2395c3a03896b56622cc528c5..9dfead20cb63a0a67af8294bd19cedc1b58940db 100644 (file)
@@ -280,8 +280,7 @@ static ssize_t usbstub_show_portids(struct device_driver *driver,
 
        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[] = {
index a4cfd2781e7fda0d9bb052fecd0f3a7df7e7bc0c..7c16968470d7be1ae2d2be751287ddafec578d22 100644 (file)
@@ -499,7 +499,8 @@ static ssize_t xendev_show_nodename(struct device *dev,
 {
        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(struct device *dev,
 {
        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,