public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] More i2c driver changes for 2.5.69
Date: Fri, 9 May 2003 16:56:34 -0700	[thread overview]
Message-ID: <10525245943169@kroah.com> (raw)
In-Reply-To: <10525245943581@kroah.com>

ChangeSet 1.1083.2.6, 2003/05/09 16:12:53-07:00, greg@kroah.com

[PATCH] i2c: register the i2c_adapter_driver so things link up properly in sysfs


 drivers/i2c/i2c-core.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)


diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
--- a/drivers/i2c/i2c-core.c	Fri May  9 16:47:36 2003
+++ b/drivers/i2c/i2c-core.c	Fri May  9 16:47:36 2003
@@ -55,8 +55,8 @@
 	return 0;
 }
 
-static struct device_driver i2c_generic_driver = {
-	.name =	"i2c",
+static struct device_driver i2c_adapter_driver = {
+	.name =	"i2c_adapter",
 	.bus = &i2c_bus_type,
 	.probe = i2c_device_probe,
 	.remove = i2c_device_remove,
@@ -98,7 +98,7 @@
 	if (adap->dev.parent == NULL)
 		adap->dev.parent = &legacy_bus;
 	sprintf(adap->dev.bus_id, "i2c-%d", adap->nr);
-	adap->dev.driver = &i2c_generic_driver;
+	adap->dev.driver = &i2c_adapter_driver;
 	device_register(&adap->dev);
 
 	/* Add this adapter to the i2c_adapter class */
@@ -462,12 +462,16 @@
 	retval = bus_register(&i2c_bus_type);
 	if (retval)
 		return retval;
+	retval = driver_register(&i2c_adapter_driver);
+	if (retval)
+		return retval;
 	return class_register(&i2c_adapter_class);
 }
 
 static void __exit i2c_exit(void)
 {
 	class_unregister(&i2c_adapter_class);
+	driver_unregister(&i2c_adapter_driver);
 	bus_unregister(&i2c_bus_type);
 }
 


      reply	other threads:[~2003-05-09 23:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-09 23:55 [BK PATCH] More i2c driver changes for 2.5.69 Greg KH
2003-05-09 23:56 ` [PATCH] " Greg KH
2003-05-09 23:56   ` Greg KH
2003-05-09 23:56     ` Greg KH
2003-05-09 23:56       ` Greg KH
2003-05-09 23:56         ` Greg KH
2003-05-09 23:56           ` Greg KH [this message]

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=10525245943169@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox