[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <000001cd6e29$fcb4bc30$f61e3490$@samsung.com>
Date: Mon, 30 Jul 2012 17:04:47 +0900
From: ¹Ú»ó¼ö <sangsu4u.park@...sung.com>
To: 'Doug Anderson' <dianders@...omium.org>,
'Sean Paul' <seanpaul@...omium.org>
Cc: grant.likely@...retlab.ca, linus.walleij@...ricsson.com,
linux-kernel@...r.kernel.org, olofj@...omium.org,
'Thomas Abraham' <thomas.abraham@...aro.org>,
'Kukjin Kim' <kgene.kim@...sung.com>
Subject: RE: [PATCH] gpio: samsung: Fix off-by-one bug in gpio addresses
> -----Original Message-----
> From: dianders@...gle.com [mailto:dianders@...gle.com] On Behalf Of Doug Anderson
> Sent: Saturday, July 21, 2012 6:07 AM
> To: Sean Paul
> Cc: grant.likely@...retlab.ca; linus.walleij@...ricsson.com; linux-kernel@...r.kernel.org;
> olofj@...omium.org; Sangsu Park; Thomas Abraham; Kukjin Kim
> Subject: Re: [PATCH] gpio: samsung: Fix off-by-one bug in gpio addresses
>
> Acked-by: Doug Anderson <dianders@...omium.org>
>
> ---
>
> On Fri, Jul 20, 2012 at 1:58 PM, Sean Paul <seanpaul@...omium.org> wrote:
> >
> > Move gpc4 to the end of the automatically processed gpio controllers
> > so we don't taint the automatic offset calculation.
> >
> > This bug caused all controllers coming after gpc4 to map to the
> > incorrect address. The result is <&gpd1 0 0 0 0> would actually map to
> > GPIO 0 in gpd0.
> >
> > Signed-off-by: Sean Paul <seanpaul@...omium.org>
> > ---
> > drivers/gpio/gpio-samsung.c | 14 +++++++-------
> > 1 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
> > index b6453d0..e4599b4 100644
> > --- a/drivers/gpio/gpio-samsung.c
> > +++ b/drivers/gpio/gpio-samsung.c
> > @@ -2454,12 +2454,6 @@ static struct samsung_gpio_chip exynos5_gpios_1[] = {
> > },
> > }, {
> > .chip = {
> > - .base = EXYNOS5_GPC4(0),
> > - .ngpio = EXYNOS5_GPIO_C4_NR,
> > - .label = "GPC4",
> > - },
> > - }, {
> > - .chip = {
> > .base = EXYNOS5_GPD0(0),
> > .ngpio = EXYNOS5_GPIO_D0_NR,
> > .label = "GPD0", @@ -2513,6 +2507,12 @@
> > static struct samsung_gpio_chip exynos5_gpios_1[] = {
> > .label = "GPY6",
> > },
> > }, {
> > + .chip = {
> > + .base = EXYNOS5_GPC4(0),
> > + .ngpio = EXYNOS5_GPIO_C4_NR,
> > + .label = "GPC4",
> > + },
> > + }, {
> > .config = &samsung_gpio_cfgs[9],
> > .irq_base = IRQ_EINT(0),
> > .chip = {
> > @@ -2833,7 +2833,7 @@ static __init void exynos5_gpiolib_init(void)
> > }
> >
> > /* need to set base address for gpc4 */
> > - exynos5_gpios_1[11].base = gpio_base1 + 0x2E0;
> > + exynos5_gpios_1[20].base = gpio_base1 + 0x2E0;
> >
> > /* need to set base address for gpx */
> > chip = &exynos5_gpios_1[21];
> > --
> > 1.7.7.3
> >
I think that this modification is right.
Thanks.
--
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