public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
To: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
Subject: [patch 1/1] i2c_gpio: keep probe resident for hotplugged devices.
Date: Wed, 25 Jun 2008 15:59:44 +0100	[thread overview]
Message-ID: <20080625145944.012741187@fluff.org> (raw)
In-Reply-To: 20080625145943.941439236@fluff.org

[-- Attachment #1: simtec/simtec-drivers-i2c-gpio-fixprobe.patch --]
[-- Type: text/plain, Size: 1385 bytes --]

Change the i2c_gpio driver to use platform_driver_register()
instead of platform_driver_probe() to ensure that is can
attach to any devices that may be loaded after it has initialised.

Signed-off-by: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>

--- linux-2.6.26-rc5-quilt1.orig/drivers/i2c/busses/i2c-gpio.c	2008-06-11 00:17:08.000000000 +0100
+++ linux-2.6.26-rc5-quilt1/drivers/i2c/busses/i2c-gpio.c	2008-06-11 00:18:00.000000000 +0100
@@ -77,7 +77,7 @@ static int i2c_gpio_getscl(void *data)
 	return gpio_get_value(pdata->scl_pin);
 }
 
-static int __init i2c_gpio_probe(struct platform_device *pdev)
+static int __devinit i2c_gpio_probe(struct platform_device *pdev)
 {
 	struct i2c_gpio_platform_data *pdata;
 	struct i2c_algo_bit_data *bit_data;
@@ -196,6 +196,7 @@ static struct platform_driver i2c_gpio_d
 		.name	= "i2c-gpio",
 		.owner	= THIS_MODULE,
 	},
+	.probe		= i2c_gpio_probe,
 	.remove		= __exit_p(i2c_gpio_remove),
 };
 
@@ -203,7 +204,7 @@ static int __init i2c_gpio_init(void)
 {
 	int ret;
 
-	ret = platform_driver_probe(&i2c_gpio_driver, i2c_gpio_probe);
+	ret = platform_driver_register(&i2c_gpio_driver);
 	if (ret)
 		printk(KERN_ERR "i2c-gpio: probe failed: %d\n", ret);
 

-- 

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

       reply	other threads:[~2008-06-25 14:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080625145943.941439236@fluff.org>
2008-06-25 14:59 ` Ben Dooks [this message]
     [not found]   ` <20080625145944.012741187-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
2008-06-28  9:40     ` [patch 1/1] i2c_gpio: keep probe resident for hotplugged devices Jean Delvare
     [not found] <20080702101611.757880819@fluff.org>
2008-07-02 10:16 ` Ben Dooks
     [not found]   ` <20080702101611.858837181-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
2008-07-02 10:44     ` Haavard Skinnemoen
     [not found]       ` <20080702124406.2f3d1384-+1Ci8juu1zowFJ3MlZkdtq14KzY7BuZjUIXZgC+OUhs@public.gmane.org>
2008-07-10 13:29         ` Ben Dooks
     [not found]           ` <20080710132917.GF30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2008-07-12  7:06             ` Jean Delvare
     [not found]               ` <20080712090600.680f3c2e-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-07-15  9:41                 ` Ben Dooks
     [not found]                   ` <20080715094147.GI30539-elnMNo+KYs3pIgCt6eIbzw@public.gmane.org>
2008-07-15 11:36                     ` Haavard Skinnemoen

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=20080625145944.012741187@fluff.org \
    --to=ben-linux-elnmno+kys3ytjvyw6ydsg@public.gmane.org \
    --cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox