2013-04-03 12:29:10

by Pawel Moll

[permalink] [raw]
Subject: [PATCH] mfd: vexpress: Give the "leds-gpio" device a real parent

The registration of the "leds-gpio" device was using
"vexpress_sysreg_dev" as a parent before it was actually
set to something different than NULL.

Trivial fix by reordering the code.

Reported-by: Lorenzo Pieralisi <[email protected]>
Signed-off-by: Pawel Moll <[email protected]>
---
drivers/mfd/vexpress-sysreg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c
index bf75e96..96a020b 100644
--- a/drivers/mfd/vexpress-sysreg.c
+++ b/drivers/mfd/vexpress-sysreg.c
@@ -490,12 +490,12 @@ static int vexpress_sysreg_probe(struct platform_device *pdev)
return err;
}

+ vexpress_sysreg_dev = &pdev->dev;
+
platform_device_register_data(vexpress_sysreg_dev, "leds-gpio",
PLATFORM_DEVID_AUTO, &vexpress_sysreg_leds_pdata,
sizeof(vexpress_sysreg_leds_pdata));

- vexpress_sysreg_dev = &pdev->dev;
-
device_create_file(vexpress_sysreg_dev, &dev_attr_sys_id);

return 0;
--
1.7.10.4


2013-04-09 10:09:39

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH] mfd: vexpress: Give the "leds-gpio" device a real parent

Hi Pawel,

On Wed, Apr 03, 2013 at 01:26:27PM +0100, Pawel Moll wrote:
> The registration of the "leds-gpio" device was using
> "vexpress_sysreg_dev" as a parent before it was actually
> set to something different than NULL.
>
> Trivial fix by reordering the code.
>
> Reported-by: Lorenzo Pieralisi <[email protected]>
> Signed-off-by: Pawel Moll <[email protected]>
> ---
> drivers/mfd/vexpress-sysreg.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/