From patchwork Tue Apr 23 07:50:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 10912061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8758112C for ; Tue, 23 Apr 2019 07:41:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C87DF287FB for ; Tue, 23 Apr 2019 07:41:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCC1D2880C; Tue, 23 Apr 2019 07:41:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CF75287FB for ; Tue, 23 Apr 2019 07:41:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726130AbfDWHlj (ORCPT ); Tue, 23 Apr 2019 03:41:39 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7224 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726696AbfDWHkY (ORCPT ); Tue, 23 Apr 2019 03:40:24 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 690377113B4E5AA2585A; Tue, 23 Apr 2019 15:40:17 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 15:40:06 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , Jean Delvare , Guenter Roeck , Subject: [PATCH next 07/25] hwmon: s3c: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:50:02 +0800 Message-ID: <20190423075020.173734-8-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423075020.173734-1-wangkefeng.wang@huawei.com> References: <20190423075020.173734-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Using dev_get_drvdata directly. Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/hwmon/s3c-hwmon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c index 0c4710d35d16..0d65aa5985e2 100644 --- a/drivers/hwmon/s3c-hwmon.c +++ b/drivers/hwmon/s3c-hwmon.c @@ -98,7 +98,7 @@ static int s3c_hwmon_read_ch(struct device *dev, static ssize_t s3c_hwmon_show_raw(struct device *dev, struct device_attribute *attr, char *buf) { - struct s3c_hwmon *adc = platform_get_drvdata(to_platform_device(dev)); + struct s3c_hwmon *adc = dev_get_drvdata(dev); struct sensor_device_attribute *sa = to_sensor_dev_attr(attr); int ret; @@ -164,7 +164,7 @@ static ssize_t s3c_hwmon_ch_show(struct device *dev, char *buf) { struct sensor_device_attribute *sen_attr = to_sensor_dev_attr(attr); - struct s3c_hwmon *hwmon = platform_get_drvdata(to_platform_device(dev)); + struct s3c_hwmon *hwmon = dev_get_drvdata(dev); struct s3c_hwmon_pdata *pdata = dev_get_platdata(dev); struct s3c_hwmon_chcfg *cfg; int ret;