From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Driver Core fixes for 2.6.0-test3
Date: Fri, 15 Aug 2003 11:25:47 -0700 [thread overview]
Message-ID: <10609719472782@kroah.com> (raw)
In-Reply-To: <20030815182459.GA3755@kroah.com>
ChangeSet 1.1152.2.1, 2003/08/14 16:31:09-07:00, greg@kroah.com
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.
drivers/base/core.c | 6 ++----
drivers/base/interface.c | 8 --------
drivers/base/platform.c | 1 -
drivers/base/power.c | 2 +-
include/linux/device.h | 1 -
5 files changed, 3 insertions(+), 15 deletions(-)
diff -Nru a/drivers/base/core.c b/drivers/base/core.c
--- a/drivers/base/core.c Fri Aug 15 11:16:13 2003
+++ b/drivers/base/core.c Fri Aug 15 11:16:13 2003
@@ -210,8 +210,7 @@
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_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 -Nru a/drivers/base/interface.c b/drivers/base/interface.c
--- a/drivers/base/interface.c Fri Aug 15 11:16:13 2003
+++ b/drivers/base/interface.c Fri Aug 15 11:16:13 2003
@@ -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 @@
device_read_power,device_write_power);
struct attribute * dev_default_attrs[] = {
- &dev_attr_name.attr,
&dev_attr_power.attr,
NULL,
};
diff -Nru a/drivers/base/platform.c b/drivers/base/platform.c
--- a/drivers/base/platform.c Fri Aug 15 11:16:13 2003
+++ b/drivers/base/platform.c Fri Aug 15 11:16:13 2003
@@ -15,7 +15,6 @@
#include <linux/init.h>
struct device legacy_bus = {
- .name = "legacy bus",
.bus_id = "legacy",
};
diff -Nru a/drivers/base/power.c b/drivers/base/power.c
--- a/drivers/base/power.c Fri Aug 15 11:16:13 2003
+++ b/drivers/base/power.c Fri Aug 15 11:16:13 2003
@@ -59,7 +59,7 @@
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 -Nru a/include/linux/device.h b/include/linux/device.h
--- a/include/linux/device.h Fri Aug 15 11:16:13 2003
+++ b/include/linux/device.h Fri Aug 15 11:16:13 2003
@@ -258,7 +258,6 @@
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 */
next prev parent reply other threads:[~2003-08-15 18:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-15 18:25 [BK PATCH] Driver Core fixes for 2.6.0-test3 Greg KH
2003-08-15 18:25 ` Greg KH [this message]
2003-08-15 18:25 ` [PATCH] " Greg KH
2003-08-15 18:25 ` Greg KH
2003-08-15 18:25 ` Greg KH
2003-08-15 18:25 ` Greg KH
2003-08-15 18:25 ` Greg KH
2003-08-15 18:25 ` Greg KH
[not found] ` <20030815215459.Y639@nightmaster.csn.tu-chemnitz.de>
2003-08-16 3:28 ` [BK PATCH] " Greg KH
2003-08-16 11:09 ` Ingo Oeser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10609719472782@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.