# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1298633517 0
# Node ID 23270e45ef1e26df9930ade7747aef0273b751a1
# Parent 2994d2997f9d035092f6cc3544ebe66d797b983a
xen: 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>
---
diff -r 2994d2997f9d -r 23270e45ef1e drivers/xen/blktap2/sysfs.c
--- a/drivers/xen/blktap2/sysfs.c Thu Feb 10 13:59:02 2011 +0000
+++ b/drivers/xen/blktap2/sysfs.c Fri Feb 25 11:31:57 2011 +0000
@@ -37,9 +37,9 @@
}
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 @@
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 @@
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 @@
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 @@
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 @@
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)
diff -r 2994d2997f9d -r 23270e45ef1e drivers/xen/pciback/pci_stub.c
--- a/drivers/xen/pciback/pci_stub.c Thu Feb 10 13:59:02 2011 +0000
+++ b/drivers/xen/pciback/pci_stub.c Fri Feb 25 11:31:57 2011 +0000
@@ -995,8 +995,7 @@
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 @@
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 @@
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 @@
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 @@
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
diff -r 2994d2997f9d -r 23270e45ef1e drivers/xen/usbback/usbstub.c
--- a/drivers/xen/usbback/usbstub.c Thu Feb 10 13:59:02 2011 +0000
+++ b/drivers/xen/usbback/usbstub.c Fri Feb 25 11:31:57 2011 +0000
@@ -280,8 +280,7 @@
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[] = {
diff -r 2994d2997f9d -r 23270e45ef1e drivers/xen/xenbus/xenbus_probe.c
--- a/drivers/xen/xenbus/xenbus_probe.c Thu Feb 10 13:59:02 2011 +0000
+++ b/drivers/xen/xenbus/xenbus_probe.c Fri Feb 25 11:31:57 2011 +0000
@@ -499,7 +499,8 @@
{
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 @@
{
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,
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|