[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200808200850.41758.david-b@pacbell.net>
Date: Wed, 20 Aug 2008 08:50:41 -0700
From: David Brownell <david-b@...bell.net>
To: Dmitry Baryshkov <dbaryshkov@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Make gpiochip label const
On Wednesday 20 August 2008, Dmitry Baryshkov wrote:
> > I don't recall seeing such warnings and I cannot make them happen with
> > drivers/gpio/gpiolib.c or with drivers/gpio/max732x.c or with
> > drivers/gpio/pca953x.c. So we still don't know what this patch
> > does :(
>
> Because both mentioned drivers set gpiochip->label to non-const string.
> You can check arch/arm/common/scoop.c for example of driver showing
> different behaviour:
You're doing it wrong -- in a small way, not a big one. Instead of
devptr->gpio.label = dev_name(&pdev->dev);
do
devptr->gpio.label = "scoop";
devptr->gpio.dev = &pdev->dev;
No warnings generated that way, and another field is set up...
- Dave
--
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