* [U-Boot] [PATCH RFT v2] gpio: at91: Fix getting address of private data
@ 2015-01-31 6:47 Axel Lin
2015-02-03 0:55 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2015-01-31 6:47 UTC (permalink / raw)
To: u-boot
Use dev_get_priv() rather than dev_get_platdata() to get correct address of
private data.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
v2: Fix an obvious typo in subject line (s/addres/address).
drivers/gpio/at91_gpio.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index 6129c02..22fbd63 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -451,7 +451,7 @@ struct at91_port_priv {
/* set GPIO pin 'gpio' as an input */
static int at91_gpio_direction_input(struct udevice *dev, unsigned offset)
{
- struct at91_port_priv *port = dev_get_platdata(dev);
+ struct at91_port_priv *port = dev_get_priv(dev);
at91_set_port_input(port->regs, offset, 0);
@@ -462,7 +462,7 @@ static int at91_gpio_direction_input(struct udevice *dev, unsigned offset)
static int at91_gpio_direction_output(struct udevice *dev, unsigned offset,
int value)
{
- struct at91_port_priv *port = dev_get_platdata(dev);
+ struct at91_port_priv *port = dev_get_priv(dev);
at91_set_port_output(port->regs, offset, value);
@@ -472,7 +472,7 @@ static int at91_gpio_direction_output(struct udevice *dev, unsigned offset,
/* read GPIO IN value of pin 'gpio' */
static int at91_gpio_get_value(struct udevice *dev, unsigned offset)
{
- struct at91_port_priv *port = dev_get_platdata(dev);
+ struct at91_port_priv *port = dev_get_priv(dev);
return at91_get_port_value(port->regs, offset);
}
@@ -481,7 +481,7 @@ static int at91_gpio_get_value(struct udevice *dev, unsigned offset)
static int at91_gpio_set_value(struct udevice *dev, unsigned offset,
int value)
{
- struct at91_port_priv *port = dev_get_platdata(dev);
+ struct at91_port_priv *port = dev_get_priv(dev);
at91_set_port_value(port->regs, offset, value);
@@ -490,7 +490,7 @@ static int at91_gpio_set_value(struct udevice *dev, unsigned offset,
static int at91_gpio_get_function(struct udevice *dev, unsigned offset)
{
- struct at91_port_priv *port = dev_get_platdata(dev);
+ struct at91_port_priv *port = dev_get_priv(dev);
/* GPIOF_FUNC is not implemented yet */
if (at91_get_port_output(port->regs, offset))
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH RFT v2] gpio: at91: Fix getting address of private data
2015-01-31 6:47 [U-Boot] [PATCH RFT v2] gpio: at91: Fix getting address of private data Axel Lin
@ 2015-02-03 0:55 ` Simon Glass
2015-02-06 21:46 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2015-02-03 0:55 UTC (permalink / raw)
To: u-boot
On 30 January 2015 at 23:47, Axel Lin <axel.lin@ingics.com> wrote:
> Use dev_get_priv() rather than dev_get_platdata() to get correct address of
> private data.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> v2: Fix an obvious typo in subject line (s/addres/address).
> drivers/gpio/at91_gpio.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Acked-by: Simon Glass <sjg@chromium.org>
Thanks for picking this up. I'll apply it to u-boot-dm soon as a bug fix.
Regards,
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH RFT v2] gpio: at91: Fix getting address of private data
2015-02-03 0:55 ` Simon Glass
@ 2015-02-06 21:46 ` Simon Glass
0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2015-02-06 21:46 UTC (permalink / raw)
To: u-boot
On 2 February 2015 at 17:55, Simon Glass <sjg@chromium.org> wrote:
> On 30 January 2015 at 23:47, Axel Lin <axel.lin@ingics.com> wrote:
>> Use dev_get_priv() rather than dev_get_platdata() to get correct address of
>> private data.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> ---
>> v2: Fix an obvious typo in subject line (s/addres/address).
>> drivers/gpio/at91_gpio.c | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>
>
> Thanks for picking this up. I'll apply it to u-boot-dm soon as a bug fix.
Applied to u-boot-dm, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-06 21:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-31 6:47 [U-Boot] [PATCH RFT v2] gpio: at91: Fix getting address of private data Axel Lin
2015-02-03 0:55 ` Simon Glass
2015-02-06 21:46 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox