Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp923821pxa; Wed, 19 Aug 2020 20:05:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBUQksqRnZ9r49JMI28Zn+BEvQr9BqibOxjg1s9T4EF7+B6oapt0vdMq0sKCnTqDoxDrIx X-Received: by 2002:aa7:d8d7:: with SMTP id k23mr1039176eds.54.1597892717607; Wed, 19 Aug 2020 20:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597892717; cv=none; d=google.com; s=arc-20160816; b=ltMxt552coS80aLqUmI6/7z0PC0LQajf9CLHJQYaW7Y6CSGKq2PEm2a0GpBRCgtvxm S7IFNfXFl4kEPu0SpZCrGCU0DPrCM5K3JycsHUOD7x/nPi8WnUwW3r9sXmUlVeA5dkz+ +P6ipS888kfOz6UQeisqkarXtI59FsXBJoS3YLRFeQJ1y93PzUaqfwB6teisgaTTjVqu ZFX+0/h0kN61sHYRZ5haozKgNFxpKUR7IsTM4/PsbTbIDeBji4xeujD4rc2LeX4Twupr hLMulC6h6rkRxUFt7x92aoikqC1k1VHQGdF1cYkvpK9g6Neiq1Ot5rO6raitITOYo8Rb 55BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:to :from; bh=iiEjc4drPErTVCHX2xH5pf6RNXBQk2ZopvKQCC2Vq9Q=; b=na3U2+oPnqD5g6Hj/wMf20JUR2TwzfX6U1TW4K6o82Zezlt5sRr+lI4Z7zIE726W7b i7+lYfLNGl5nr+nIWf2czlh9g++Ayaqnz7wkhj8GlZAjU1wYLRO1qq+vS/jm/0QChgTy qd7G6UPchbUbUQOH9HT2BdYjdBjB8SrQp6xNJj305YFOi2eiHqMBnUyk9h2IXGKJZOej ni9UeWSi6pG3w6I3Q7bDOSaiRI+QYEYqWO74RctfqebBe2DhY0zOJEcUQRR04nBcBeJn S+iNeShm7qeXLU/BkGCl5Mhh17pnvDwmBpcDzXKo6o4aOxF7255CdcZdB7GZ86uKi+FX d+NA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z3si423683ejw.295.2020.08.19.20.04.54; Wed, 19 Aug 2020 20:05:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726745AbgHTDDg (ORCPT + 99 others); Wed, 19 Aug 2020 23:03:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:47312 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726675AbgHTDDg (ORCPT ); Wed, 19 Aug 2020 23:03:36 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 678F4137AC55FABC892E; Thu, 20 Aug 2020 11:03:34 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 20 Aug 2020 11:03:32 +0800 From: Tian Tao To: , , , , , , Subject: [PATCH] iio: adc: adi-axi-adc: Use kobj_to_dev() instead of container_of() Date: Thu, 20 Aug 2020 11:01:26 +0800 Message-ID: <1597892486-3236-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao --- 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