sh: struct device - replace bus_id with dev_name(), dev_set_name()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:21 pm

Gitweb:     http://git.kernel.org/linus/93fde774546c947ac8563da431f0a6d47452551d
Commit:     93fde774546c947ac8563da431f0a6d47452551d
Parent:     0d5e19ab07cf61cb0794cfac4df0a1bd5d1e19d7
Author:     Kay Sievers <kay.sievers@vrfy.org>
AuthorDate: Tue Mar 3 12:16:12 2009 +0900
Committer:  Paul Mundt <lethal@linux-sh.org>
CommitDate: Tue Mar 3 12:16:12 2009 +0900

    sh: struct device - replace bus_id with dev_name(), dev_set_name()
    
    Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
    Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
    Signed-off-by: Paul Mundt <lethal@linux-sh.org>
---
 drivers/sh/maple/maple.c           |   11 +++++------
 drivers/sh/superhyway/superhyway.c |    4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c
index 4054fe9..c71bb4b 100644
--- a/drivers/sh/maple/maple.c
+++ b/drivers/sh/maple/maple.c
@@ -368,10 +368,8 @@ static void maple_attach_driver(struct maple_device *mdev)
 		/* Do this silently - as not a real device */
 		function = 0;
 		mdev->driver = &maple_unsupported_device;
-		sprintf(mdev->dev.bus_id, "%d:0.port", mdev->port);
-
+		dev_set_name(&mdev->dev, "%d:0.port", mdev->port);
 	} else {
-
 		matched =
 			bus_for_each_drv(&maple_bus_type, NULL, mdev,
 				maple_check_matching_driver);
@@ -381,8 +379,9 @@ static void maple_attach_driver(struct maple_device *mdev)
 			dev_info(&mdev->dev, "no driver found\n");
 			mdev->driver = &maple_unsupported_device;
 		}
-		sprintf(mdev->dev.bus_id, "%d:0%d.%lX", mdev->port,
-			mdev->unit, function);
+
+		dev_set_name(&mdev->dev, "%d:0%d.%lX", mdev->port,
+			     mdev->unit, function);
 	}
 
 	mdev->function = function;
@@ -789,7 +788,7 @@ struct bus_type maple_bus_type = {
 EXPORT_SYMBOL_GPL(maple_bus_type);
 
 static struct device maple_bus = {
-	.bus_id = "maple",
+	.init_name = "maple",
 	.release = maple_bus_release,
 };
 
diff --git a/drivers/sh/superhyway/superhyway.c b/drivers/sh/superhyway/superhyway.c
index 4d0282b..2d9e7f3 100644
--- a/drivers/sh/superhyway/superhyway.c
+++ b/drivers/sh/superhyway/superhyway.c
@@ -22,7 +22,7 @@
 static int superhyway_devices;
 
 static struct device superhyway_bus_device = {
-	.bus_id = "superhyway",
+	.init_name = "superhyway",
 };
 
 static void superhyway_device_release(struct device *dev)
@@ -83,7 +83,7 @@ int superhyway_add_device(unsigned long base, struct superhyway_device *sdev,
 	dev->id.id		= dev->vcr.mod_id;
 
 	sprintf(dev->name, "SuperHyway device %04x", dev->id.id);
-	sprintf(dev->dev.bus_id, "%02x", superhyway_devices);
+	dev_set_name(&dev->dev, "%02x", superhyway_devices);
 
 	superhyway_devices++;
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
sh: struct device - replace bus_id with dev_name(), dev_se ..., Linux Kernel Mailing ..., (Thu Mar 26, 12:21 pm)