public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* Again on virtual i2c adapter support.
@ 2009-01-22 15:02 Rodolfo Giometti
       [not found] ` <20090122150230.GA10952-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Rodolfo Giometti @ 2009-01-22 15:02 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Kumar Gala

Hello Jean,

I'm working again on virtual i2c adapter support :) since I received
several letters asking for this support. That's why I'd like to have
from you some advice in order to propose a working code.

Looking at latest i2c code I suppose we can modify the
i2c_del_driver() function as follow:

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index b1c9abe..3454878 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -799,10 +799,10 @@ void i2c_del_driver(struct i2c_driver *driver)
        class_for_each_device(&i2c_adapter_class, NULL, driver,
                              __detach_adapter);

+       mutex_unlock(&core_lock);
+
        driver_unregister(&driver->driver);
        pr_debug("i2c-core: driver [%s] unregistered\n",
        driver->driver.name);
-
-       mutex_unlock(&core_lock);
 }
 EXPORT_SYMBOL(i2c_del_driver);

Unluckely I'm not an i2c guru so I'd like to ask to you. If such
modification is correct I can provide a simple support with no
modifications to the i2c core! Apart this one, of course... :)

If you agree I can send a patchset, but everything is based on the
above change...

Thanks for your suggestions,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail: giometti-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org
Linux Device Driver                          giometti-k2GhghHVRtY@public.gmane.org
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2009-01-23 18:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 15:02 Again on virtual i2c adapter support Rodolfo Giometti
     [not found] ` <20090122150230.GA10952-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2009-01-23  8:51   ` Jean Delvare
     [not found]     ` <20090123095110.7b0c7b82-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-01-23  9:23       ` Peter Korsgaard
     [not found]         ` <878wp2ml52.fsf-uXGAPMMVk8amE9MCos8gUmSdvHPH+/yF@public.gmane.org>
2009-01-23  9:36           ` Jean Delvare
     [not found]             ` <20090123103659.38a25c30-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-01-23  9:49               ` Peter Korsgaard
     [not found]                 ` <874ozqmjwq.fsf-uXGAPMMVk8amE9MCos8gUmSdvHPH+/yF@public.gmane.org>
2009-01-23 14:16                   ` Jean Delvare
     [not found]                     ` <20090123151613.7424fa4f-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-01-23 15:04                       ` Peter Korsgaard
2009-01-23 13:48           ` Rodolfo Giometti
     [not found]             ` <20090123134833.GH12256-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2009-01-23 14:01               ` Peter Korsgaard
2009-01-23 17:27               ` Michelle Konzack
     [not found]                 ` <20090123172747.GB24751-qCYv2r+mE47ltxMxsNcu6w@public.gmane.org>
2009-01-23 18:52                   ` Peter Korsgaard
2009-01-23  9:39       ` David Brownell
     [not found]         ` <200901230139.38785.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2009-01-23 14:21           ` Jean Delvare
2009-01-23 13:44       ` Rodolfo Giometti
2009-01-23 14:24   ` Jean Delvare
     [not found]     ` <20090123152434.423ba1e7-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-01-23 14:34       ` Rodolfo Giometti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox