Commit df711fe8 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Driver Core: remove struct device.name as it is not needed

If a specific driver subsystem needs a name field, they should implement it
for just that subsystem.
parent 310b411f
...@@ -210,8 +210,7 @@ int device_add(struct device *dev) ...@@ -210,8 +210,7 @@ int device_add(struct device *dev)
parent = get_device(dev->parent); parent = get_device(dev->parent);
pr_debug("DEV: registering device: ID = '%s', name = %s\n", pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id);
dev->bus_id, dev->name);
/* first, register with generic layer. */ /* first, register with generic layer. */
strlcpy(dev->kobj.name,dev->bus_id,KOBJ_NAME_LEN); strlcpy(dev->kobj.name,dev->bus_id,KOBJ_NAME_LEN);
...@@ -337,8 +336,7 @@ void device_del(struct device * dev) ...@@ -337,8 +336,7 @@ void device_del(struct device * dev)
*/ */
void device_unregister(struct device * dev) void device_unregister(struct device * dev)
{ {
pr_debug("DEV: Unregistering device. ID = '%s', name = '%s'\n", pr_debug("DEV: Unregistering device. ID = '%s'\n", dev->bus_id);
dev->bus_id,dev->name);
device_del(dev); device_del(dev);
put_device(dev); put_device(dev);
} }
......
...@@ -14,13 +14,6 @@ ...@@ -14,13 +14,6 @@
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/string.h> #include <linux/string.h>
static ssize_t device_read_name(struct device * dev, char * buf)
{
return sprintf(buf,"%s\n",dev->name);
}
static DEVICE_ATTR(name,S_IRUGO,device_read_name,NULL);
static ssize_t static ssize_t
device_read_power(struct device * dev, char * page) device_read_power(struct device * dev, char * page)
{ {
...@@ -91,7 +84,6 @@ static DEVICE_ATTR(power,S_IWUSR | S_IRUGO, ...@@ -91,7 +84,6 @@ static DEVICE_ATTR(power,S_IWUSR | S_IRUGO,
device_read_power,device_write_power); device_read_power,device_write_power);
struct attribute * dev_default_attrs[] = { struct attribute * dev_default_attrs[] = {
&dev_attr_name.attr,
&dev_attr_power.attr, &dev_attr_power.attr,
NULL, NULL,
}; };
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/init.h> #include <linux/init.h>
struct device legacy_bus = { struct device legacy_bus = {
.name = "legacy bus",
.bus_id = "legacy", .bus_id = "legacy",
}; };
......
...@@ -59,7 +59,7 @@ int device_suspend(u32 state, u32 level) ...@@ -59,7 +59,7 @@ int device_suspend(u32 state, u32 level)
error = dev->driver->suspend(dev,state,level); error = dev->driver->suspend(dev,state,level);
if (error) if (error)
printk(KERN_ERR "%s: suspend returned %d\n", printk(KERN_ERR "%s: suspend returned %d\n",
dev->name,error); dev->bus_id, error);
} }
} }
up_write(&devices_subsys.rwsem); up_write(&devices_subsys.rwsem);
......
...@@ -258,7 +258,6 @@ struct device { ...@@ -258,7 +258,6 @@ struct device {
struct device * parent; struct device * parent;
struct kobject kobj; struct kobject kobj;
char name[DEVICE_NAME_SIZE]; /* descriptive ascii string */
char bus_id[BUS_ID_SIZE]; /* position on parent bus */ char bus_id[BUS_ID_SIZE]; /* position on parent bus */
struct bus_type * bus; /* type of bus device is on */ struct bus_type * bus; /* type of bus device is on */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment