summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-08-20 11:01:26 +0800
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-09-03 19:40:47 +0100
commitf6712ed711236159e99ed48221ba41c931721503 (patch)
tree4a229cc510a9a664887355fb4fa79f835f3c5261
parent59713492b7866e031e0c66e25f4f034c96f1be5a (diff)
downloadlwn-f6712ed711236159e99ed48221ba41c931721503.tar.gz
lwn-f6712ed711236159e99ed48221ba41c931721503.zip
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@hisilicon.com> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/adc/adi-axi-adc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c
index 86b6b65916ee..9109da2d2e15 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;