mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] fixup! aiodev: port Linux imx7d-adc driver
Date: Thu, 20 Oct 2022 17:38:15 +0200	[thread overview]
Message-ID: <20221020153815.3127522-1-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20221020152853.3021713-1-a.fatoum@pengutronix.de>

Should've tested the devinfo first, before sending it out.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/aiodev/imx7d_adc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/aiodev/imx7d_adc.c b/drivers/aiodev/imx7d_adc.c
index 9820aaff1ac4..d35216aac421 100644
--- a/drivers/aiodev/imx7d_adc.c
+++ b/drivers/aiodev/imx7d_adc.c
@@ -383,7 +383,7 @@ static u32 imx7d_adc_get_sample_rate(struct imx7d_adc *info)
 
 static void imx7d_adc_devinfo(struct device_d *dev)
 {
-	struct imx7d_adc *info = dev->priv;
+	struct imx7d_adc *info = dev->parent->priv;
 
 	if (info->aiodev_info)
 		info->aiodev_info(dev);
@@ -415,7 +415,8 @@ static int imx7d_adc_probe(struct device_d *dev)
 		return dev_err_probe(dev, PTR_ERR(info->regs),
 				     "Failed to get memory region\n");
 
-	dev->priv = aiodev = &info->aiodev;
+	dev->priv = info;
+	aiodev = &info->aiodev;
 
 	aiodev->num_channels = 16;
 	aiodev->hwdev = dev;
-- 
2.30.2




  reply	other threads:[~2022-10-20 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 15:28 [PATCH] " Ahmad Fatoum
2022-10-20 15:38 ` Ahmad Fatoum [this message]
2022-10-24  8:12 ` Sascha Hauer
2022-10-24  9:56   ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221020153815.3127522-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox