aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 8856d74545d9..4b9b0d7f6022 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -626,6 +626,7 @@ int device_create_file(struct device *dev,
626 626
627 return error; 627 return error;
628} 628}
629EXPORT_SYMBOL_GPL(device_create_file);
629 630
630/** 631/**
631 * device_remove_file - remove sysfs attribute file. 632 * device_remove_file - remove sysfs attribute file.
@@ -638,6 +639,7 @@ void device_remove_file(struct device *dev,
638 if (dev) 639 if (dev)
639 sysfs_remove_file(&dev->kobj, &attr->attr); 640 sysfs_remove_file(&dev->kobj, &attr->attr);
640} 641}
642EXPORT_SYMBOL_GPL(device_remove_file);
641 643
642/** 644/**
643 * device_create_bin_file - create sysfs binary attribute file for device. 645 * device_create_bin_file - create sysfs binary attribute file for device.
@@ -748,6 +750,7 @@ void device_initialize(struct device *dev)
748 device_pm_init(dev); 750 device_pm_init(dev);
749 set_dev_node(dev, -1); 751 set_dev_node(dev, -1);
750} 752}
753EXPORT_SYMBOL_GPL(device_initialize);
751 754
752struct kobject *virtual_device_parent(struct device *dev) 755struct kobject *virtual_device_parent(struct device *dev)
753{ 756{
@@ -1187,6 +1190,7 @@ name_error:
1187 dev->p = NULL; 1190 dev->p = NULL;
1188 goto done; 1191 goto done;
1189} 1192}
1193EXPORT_SYMBOL_GPL(device_add);
1190 1194
1191/** 1195/**
1192 * device_register - register a device with the system. 1196 * device_register - register a device with the system.
@@ -1211,6 +1215,7 @@ int device_register(struct device *dev)
1211 device_initialize(dev); 1215 device_initialize(dev);
1212 return device_add(dev); 1216 return device_add(dev);
1213} 1217}
1218EXPORT_SYMBOL_GPL(device_register);
1214 1219
1215/** 1220/**
1216 * get_device - increment reference count for device. 1221 * get_device - increment reference count for device.
@@ -1224,6 +1229,7 @@ struct device *get_device(struct device *dev)
1224{ 1229{
1225 return dev ? kobj_to_dev(kobject_get(&dev->kobj)) : NULL; 1230 return dev ? kobj_to_dev(kobject_get(&dev->kobj)) : NULL;
1226} 1231}
1232EXPORT_SYMBOL_GPL(get_device);
1227 1233
1228/** 1234/**
1229 * put_device - decrement reference count. 1235 * put_device - decrement reference count.
@@ -1235,6 +1241,7 @@ void put_device(struct device *dev)
1235 if (dev) 1241 if (dev)
1236 kobject_put(&dev->kobj); 1242 kobject_put(&dev->kobj);
1237} 1243}
1244EXPORT_SYMBOL_GPL(put_device);
1238 1245
1239/** 1246/**
1240 * device_del - delete device from system. 1247 * device_del - delete device from system.
@@ -1297,6 +1304,7 @@ void device_del(struct device *dev)
1297 kobject_del(&dev->kobj); 1304 kobject_del(&dev->kobj);
1298 put_device(parent); 1305 put_device(parent);
1299} 1306}
1307EXPORT_SYMBOL_GPL(device_del);
1300 1308
1301/** 1309/**
1302 * device_unregister - unregister device from system. 1310 * device_unregister - unregister device from system.
@@ -1315,6 +1323,7 @@ void device_unregister(struct device *dev)
1315 device_del(dev); 1323 device_del(dev);
1316 put_device(dev); 1324 put_device(dev);
1317} 1325}
1326EXPORT_SYMBOL_GPL(device_unregister);
1318 1327
1319static struct device *next_device(struct klist_iter *i) 1328static struct device *next_device(struct klist_iter *i)
1320{ 1329{
@@ -1403,6 +1412,7 @@ int device_for_each_child(struct device *parent, void *data,
1403 klist_iter_exit(&i); 1412 klist_iter_exit(&i);
1404 return error; 1413 return error;
1405} 1414}
1415EXPORT_SYMBOL_GPL(device_for_each_child);
1406 1416
1407/** 1417/**
1408 * device_find_child - device iterator for locating a particular device. 1418 * device_find_child - device iterator for locating a particular device.
@@ -1437,6 +1447,7 @@ struct device *device_find_child(struct device *parent, void *data,
1437 klist_iter_exit(&i); 1447 klist_iter_exit(&i);
1438 return child; 1448 return child;
1439} 1449}
1450EXPORT_SYMBOL_GPL(device_find_child);
1440 1451
1441int __init devices_init(void) 1452int __init devices_init(void)
1442{ 1453{
@@ -1464,21 +1475,6 @@ int __init devices_init(void)
1464 return -ENOMEM; 1475 return -ENOMEM;
1465} 1476}
1466 1477
1467EXPORT_SYMBOL_GPL(device_for_each_child);
1468EXPORT_SYMBOL_GPL(device_find_child);
1469
1470EXPORT_SYMBOL_GPL(device_initialize);
1471EXPORT_SYMBOL_GPL(device_add);
1472EXPORT_SYMBOL_GPL(device_register);
1473
1474EXPORT_SYMBOL_GPL(device_del);
1475EXPORT_SYMBOL_GPL(device_unregister);
1476EXPORT_SYMBOL_GPL(get_device);
1477EXPORT_SYMBOL_GPL(put_device);
1478
1479EXPORT_SYMBOL_GPL(device_create_file);
1480EXPORT_SYMBOL_GPL(device_remove_file);
1481
1482static DEFINE_MUTEX(device_hotplug_lock); 1478static DEFINE_MUTEX(device_hotplug_lock);
1483 1479
1484void lock_device_hotplug(void) 1480void lock_device_hotplug(void)