* [PATCH] gpio/gpio-omap: Use existing pointer to struct device
@ 2012-10-05 9:37 Tobias Klauser
2012-10-05 19:05 ` Kevin Hilman
2012-10-08 18:55 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Tobias Klauser @ 2012-10-05 9:37 UTC (permalink / raw)
To: Santosh Shilimkar, Kevin Hilman, Grant Likely, Linus Walleij; +Cc: linux-omap
A pointer to "pdev->dev" is already stored in "dev", so use it in
devm_kzalloc.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
drivers/gpio/gpio-omap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 94cbc84..eb73dee 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1070,7 +1070,7 @@ static int __devinit omap_gpio_probe(struct platform_device *pdev)
if (!pdata)
return -EINVAL;
- bank = devm_kzalloc(&pdev->dev, sizeof(struct gpio_bank), GFP_KERNEL);
+ bank = devm_kzalloc(dev, sizeof(struct gpio_bank), GFP_KERNEL);
if (!bank) {
dev_err(dev, "Memory alloc failed\n");
return -ENOMEM;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio/gpio-omap: Use existing pointer to struct device
2012-10-05 9:37 [PATCH] gpio/gpio-omap: Use existing pointer to struct device Tobias Klauser
@ 2012-10-05 19:05 ` Kevin Hilman
2012-10-08 18:55 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2012-10-05 19:05 UTC (permalink / raw)
To: Tobias Klauser; +Cc: Santosh Shilimkar, Grant Likely, Linus Walleij, linux-omap
Tobias Klauser <tklauser@distanz.ch> writes:
> A pointer to "pdev->dev" is already stored in "dev", so use it in
> devm_kzalloc.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Kevin Hilman <khilman@ti.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio/gpio-omap: Use existing pointer to struct device
2012-10-05 9:37 [PATCH] gpio/gpio-omap: Use existing pointer to struct device Tobias Klauser
2012-10-05 19:05 ` Kevin Hilman
@ 2012-10-08 18:55 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-10-08 18:55 UTC (permalink / raw)
To: Tobias Klauser; +Cc: Santosh Shilimkar, Kevin Hilman, Grant Likely, linux-omap
On Fri, Oct 5, 2012 at 11:37 AM, Tobias Klauser <tklauser@distanz.ch> wrote:
> A pointer to "pdev->dev" is already stored in "dev", so use it in
> devm_kzalloc.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Applied with Kevin's ACK, thanks!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-08 18:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05 9:37 [PATCH] gpio/gpio-omap: Use existing pointer to struct device Tobias Klauser
2012-10-05 19:05 ` Kevin Hilman
2012-10-08 18:55 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.