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] i2c driver changes for 2.5.66
Date: Mon, 24 Mar 2003 17:38 -0800	[thread overview]
Message-ID: <10485563252071@kroah.com> (raw)
In-Reply-To: <10485563242021@kroah.com>

ChangeSet 1.985.1.4, 2003/03/24 15:16:12-08:00, greg@kroah.com

[PATCH] i2c: set up a "generic" i2c driver to prevent oopses when devices are registering.

This is needed as we are still not using the driver core model for
matching up devices to drivers, but doing it by hand.  Once that is
changed, this will not be needed.


 drivers/i2c/i2c-core.c |    9 +++++++++
 1 files changed, 9 insertions(+)


diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
--- a/drivers/i2c/i2c-core.c	Mon Mar 24 17:26:51 2003
+++ b/drivers/i2c/i2c-core.c	Mon Mar 24 17:26:51 2003
@@ -65,6 +65,14 @@
 	return 0;
 }
 
+static struct device_driver i2c_generic_driver = {
+	.name =	"i2c",
+	.bus = &i2c_bus_type,
+	.probe = i2c_device_probe,
+	.remove = i2c_device_remove,
+};
+
+
 /* ---------------------------------------------------
  * registering functions 
  * --------------------------------------------------- 
@@ -106,6 +114,7 @@
 	if (adap->dev.parent == NULL)
 		adap->dev.parent = &legacy_bus;
 	sprintf(adap->dev.bus_id, "i2c-%d", i);
+	adap->dev.driver = &i2c_generic_driver;
 	device_register(&adap->dev);
 
 	/* inform drivers of new adapters */


  reply	other threads:[~2003-03-25  1:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-25  1:35 [BK PATCH] i2c driver changes for 2.5.66 Greg KH
2003-03-25  1:38 ` [PATCH] " Greg KH
2003-03-25  1:38   ` Greg KH
2003-03-25  1:38     ` Greg KH
2003-03-25  1:38       ` Greg KH
2003-03-25  1:38         ` Greg KH
2003-03-25  1:38           ` Greg KH
2003-03-25  1:38             ` Greg KH
2003-03-25  1:38               ` Greg KH
2003-03-25  1:38                 ` Greg KH
2003-03-25  1:38                   ` Greg KH
2003-03-25  1:38                     ` Greg KH
2003-03-25  1:38                       ` Greg KH
2003-03-25  1:38                         ` Greg KH
2003-03-25  1:38                           ` Greg KH
2003-03-25  1:38                             ` Greg KH [this message]
2003-03-25  8:55     ` Russell King
2003-03-25  8:58       ` Russell King
2003-03-25  9:17   ` Jan Dittmer
2003-03-26  1:22     ` Greg KH

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=10485563252071@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