[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1597892486-3236-1-git-send-email-tiantao6@hisilicon.com>
Date: Thu, 20 Aug 2020 11:01:26 +0800
From: Tian Tao <tiantao6@...ilicon.com>
To: <lars@...afoo.de>, <Michael.Hennerich@...log.com>,
<jic23@...nel.org>, <knaack.h@....de>, <pmeerw@...erw.net>,
<linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of()
Use kobj_to_dev() instead of container_of()
Signed-off-by: Tian Tao <tiantao6@...ilicon.com>
---
drivers/iio/adc/adi-axi-adc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c
index 86b6b65..9109da2 100644
--- a/drivers/iio/adc/adi-axi-adc.c
+++ b/drivers/iio/adc/adi-axi-adc.c
@@ -276,7 +276,7 @@ static struct attribute *adi_axi_adc_attributes[] = {
static umode_t axi_adc_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct adi_axi_adc_state *st = iio_priv(indio_dev);
struct adi_axi_adc_conv *conv = &st->client->conv;
--
2.7.4
Powered by blists - more mailing lists