[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BANLkTikL+HSnR2L6WKZ-QH5RieMMAdbpNA@mail.gmail.com>
Date: Fri, 6 May 2011 13:00:20 -0700
From: Natarajan Gurumoorthy <natg@...gle.com>
To: guenter.roeck@...csson.com
Cc: Jean Delvare <khali@...ux-fr.org>,
Wim Van Sebroeck <wim@...ana.be>,
"lm-sensors@...sensors.org" <lm-sensors@...sensors.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"mikew@...gle.com" <mikew@...gle.com>
Subject: Re:
Guenter,
Good catch. Forgot to checkin drivers/hwmon/it87.c. Also found a
couple of places I missed in driver/watch/it8712_wdt.c. Patch #9 will
be shipped later tonight. Got pulled off to do something else. Expect
patch late tonight.
Regards
Nat
On Fri, May 6, 2011 at 12:13 PM, Guenter Roeck
<guenter.roeck@...csson.com> wrote:
> On Fri, 2011-05-06 at 14:52 -0400, Nat Gurumoorthy wrote:
>> There are 3 different drivers that touch the it87 hardware registers.
>> The 3 drivers have been written independently and access the it87 hardware
>> registers assuming they are the only driver accessing it. This change
>> attempts to serialize access to the hardware by using
>> "request_muxed_region" macro defined by Alan Cox. Call to this macro
>> will hold off the requestor if the resource is currently busy.
>> The use of the above macro makes it possible to get rid of
>> spinlocks in it8712f_wdt.c and it87_wdt.c watchdog drivers.
>> This also greatly simplifies the implementation of it87_wdt.c driver.
>>
>> 01 - Changes to it87 watchdog driver to use "request_muxed_region"
>> drivers/watchdog/it8712f_wdt.c
>> drivers/watchdog/it87_wdt.c
>>
>> 02 - Chages to hwmon it87 driver to use "request_muxed_region"
>> drivers/hwmon/it87.c
>>
>> drivers/hwmon/it87.c | 14 +++-
>> drivers/watchdog/it8712f_wdt.c | 60 ++++++++++----
>> drivers/watchdog/it87_wdt.c | 165 +++++++++++++++++++++++----------------
>> 3 files changed, 152 insertions(+), 87 deletions(-)
>> diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
>>
>> Signed-off-by: Nat Gurumoorthy <natg@...gle.com>
>>
>> Patch History:
>> v8:
>> - Return the error actually returned by superio_enter and not -EBUSY.
>
> Hi Nat,
>
> Your use of -EBUSY vs. the returned error code is still inconsistent,
> for superio_enter() as well as for other functions returning an error
> code.
>
> Also, the following line split is really unnecessary.
>
> -static inline void superio_enter(void)
> +static inline int
> +superio_enter(void)
>
> Guenter
>
>
>
--
Regards
Nat Gurumoorthy AB6SJ
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists