diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2003-08-14 02:31:09 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-08-14 02:31:09 -0700 |
| commit | df711fe886842e114932ca7b11d7fa750bc136cc (patch) | |
| tree | bed74cfef2c360d49f7668cf7494b471ebb3edec | |
| parent | 310b411f7f1ac37de5c8b9db5edd8b436b4b5eba (diff) | |
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.
| -rw-r--r-- | drivers/base/core.c | 6 | ||||
| -rw-r--r-- | drivers/base/interface.c | 8 | ||||
| -rw-r--r-- | drivers/base/platform.c | 1 | ||||
| -rw-r--r-- | drivers/base/power.c | 2 | ||||
| -rw-r--r-- | include/linux/device.h | 1 |
5 files changed, 3 insertions, 15 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 3a36e17d4890..f02163611063 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -210,8 +210,7 @@ int device_add(struct device *dev) parent = get_device(dev->parent); - pr_debug("DEV: registering device: ID = '%s', name = %s\n", - dev->bus_id, dev->name); + pr_debug("DEV: registering device: ID = '%s'\n", dev->bus_id); /* first, register with generic layer. */ strlcpy(dev->kobj.name,dev->bus_id,KOBJ_NAME_LEN); @@ -337,8 +336,7 @@ void device_del(struct device * dev) */ void device_unregister(struct device * dev) { - pr_debug("DEV: Unregistering device. ID = '%s', name = '%s'\n", - dev->bus_id,dev->name); + pr_debug("DEV: Unregistering device. ID = '%s'\n", dev->bus_id); device_del(dev); put_device(dev); } diff --git a/drivers/base/interface.c b/drivers/base/interface.c index 1622db6010d2..14d8b9cfd001 100644 --- a/drivers/base/interface.c +++ b/drivers/base/interface.c @@ -14,13 +14,6 @@ #include <linux/stat.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 device_read_power(struct device * dev, char * page) { @@ -91,7 +84,6 @@ static DEVICE_ATTR(power,S_IWUSR | S_IRUGO, device_read_power,device_write_power); struct attribute * dev_default_attrs[] = { - &dev_attr_name.attr, &dev_attr_power.attr, NULL, }; diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 2813a42a2f19..15a0a83979b8 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -15,7 +15,6 @@ #include <linux/init.h> struct device legacy_bus = { - .name = "legacy bus", .bus_id = "legacy", }; diff --git a/drivers/base/power.c b/drivers/base/power.c index ba83ee21f758..228986443c75 100644 --- a/drivers/base/power.c +++ b/drivers/base/power.c @@ -59,7 +59,7 @@ int device_suspend(u32 state, u32 level) error = dev->driver->suspend(dev,state,level); if (error) printk(KERN_ERR "%s: suspend returned %d\n", - dev->name,error); + dev->bus_id, error); } } up_write(&devices_subsys.rwsem); diff --git a/include/linux/device.h b/include/linux/device.h index 2795b85ac6f1..4150645998af 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -258,7 +258,6 @@ struct device { struct device * parent; struct kobject kobj; - char name[DEVICE_NAME_SIZE]; /* descriptive ascii string */ char bus_id[BUS_ID_SIZE]; /* position on parent bus */ struct bus_type * bus; /* type of bus device is on */ |
