* [PATCH] firmware: tegra: set drvdata earlier
@ 2017-08-17 9:49 Timo Alho
2017-08-17 11:08 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Timo Alho @ 2017-08-17 9:49 UTC (permalink / raw)
To: thierry.reding; +Cc: linux-tegra, linux-kernel, Timo Alho
Subdevices of bpmp, such as bpmp-i2c, require the bpmp device's
drvdata to be set during their probe. Currently this is not always the
case. Fix this by calling platform_set_drvdata() earlier during bpmp's
probe.
Signed-off-by: Timo Alho <talho@nvidia.com>
---
drivers/firmware/tegra/bpmp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
index b251795..73ca55b 100644
--- a/drivers/firmware/tegra/bpmp.c
+++ b/drivers/firmware/tegra/bpmp.c
@@ -806,6 +806,8 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "firmware: %s\n", tag);
+ platform_set_drvdata(pdev, bpmp);
+
err = of_platform_default_populate(pdev->dev.of_node, NULL, &pdev->dev);
if (err < 0)
goto free_mrq;
@@ -822,8 +824,6 @@ static int tegra_bpmp_probe(struct platform_device *pdev)
if (err < 0)
goto free_mrq;
- platform_set_drvdata(pdev, bpmp);
-
return 0;
free_mrq:
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] firmware: tegra: set drvdata earlier
2017-08-17 9:49 [PATCH] firmware: tegra: set drvdata earlier Timo Alho
@ 2017-08-17 11:08 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2017-08-17 11:08 UTC (permalink / raw)
To: Timo Alho; +Cc: linux-tegra, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]
On Thu, Aug 17, 2017 at 12:49:11PM +0300, Timo Alho wrote:
> Subdevices of bpmp, such as bpmp-i2c, require the bpmp device's
> drvdata to be set during their probe. Currently this is not always the
> case. Fix this by calling platform_set_drvdata() earlier during bpmp's
> probe.
>
> Signed-off-by: Timo Alho <talho@nvidia.com>
> ---
> drivers/firmware/tegra/bpmp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to for-4.14/firmware, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-17 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 9:49 [PATCH] firmware: tegra: set drvdata earlier Timo Alho
2017-08-17 11:08 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox