[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200806112328.14814.david-b@pacbell.net>
Date: Wed, 11 Jun 2008 23:28:14 -0700
From: David Brownell <david-b@...bell.net>
To: Guennadi Liakhovetski <g.liakhovetski@....de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [WARNING] local_bh_enable with irqs disabled:
On Tuesday 10 June 2008, David Brownell wrote:
> On Thursday 05 June 2008, Guennadi Liakhovetski wrote:
> > Sorry, this was a 2.6.26-rc3 based kernel with the gpio-sysfs patch from
> > David, e.g., http://marc.info/?l=linux-kernel&m=121107105300923&w=2,
> > which introduces a call to device_unregister via gpiochip_unexport(chip);
> > in gpiochip_remove.
>
> Right. Obviously that wasn't tested with "rmmod" of a modular
> GPIO expander ... I only have one board which supports such an
> expander right now, and it's not been in use recently.
>
> A fix is obvious; any problems with what's below?
I verified it works for me on that one board ... after I removed
the board hooks that actually *use* those GPIOs (which prevent an
rmmod) and just use it from sysfs. The missing test case has now
been covered.
I'll send an updated patch.
- Dave
>
> - Dave
>
>
> --- g26.orig/drivers/gpio/gpiolib.c 2008-06-10 16:56:01.000000000 -0700
> +++ g26/drivers/gpio/gpiolib.c 2008-06-10 16:55:39.000000000 -0700
> @@ -726,12 +726,15 @@ int gpiochip_remove(struct gpio_chip *ch
> }
> }
> if (status == 0) {
> - gpiochip_unexport(chip);
> for (id = chip->base; id < chip->base + chip->ngpio; id++)
> gpio_desc[id].chip = NULL;
> }
>
> spin_unlock_irqrestore(&gpio_lock, flags);
> +
> + if (status == 0)
> + gpiochip_unexport(chip);
> +
> return status;
> }
> EXPORT_SYMBOL_GPL(gpiochip_remove);
>
>
--
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