From patchwork Tue Apr 23 07:49:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 10912037 X-Patchwork-Delegate: rjw@sisk.pl 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 6BA1A1575 for ; Tue, 23 Apr 2019 07:40:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58273286D4 for ; Tue, 23 Apr 2019 07:40:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48E2028701; Tue, 23 Apr 2019 07:40:17 +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 CB946286D4 for ; Tue, 23 Apr 2019 07:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726416AbfDWHkQ (ORCPT ); Tue, 23 Apr 2019 03:40:16 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6680 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726364AbfDWHkQ (ORCPT ); Tue, 23 Apr 2019 03:40:16 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D35034C2A2796E794A24; Tue, 23 Apr 2019 15:40:12 +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:02 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , "Rafael J. Wysocki" , Srinivas Pandruvada , Subject: [PATCH next 01/25] ACPI / DPTF: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:49:56 +0800 Message-ID: <20190423075020.173734-2-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-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Using dev_get_drvdata directly. Cc: "Rafael J. Wysocki" Cc: Srinivas Pandruvada Cc: linux-acpi@vger.kernel.org Signed-off-by: Kefeng Wang --- drivers/acpi/dptf/dptf_power.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/acpi/dptf/dptf_power.c b/drivers/acpi/dptf/dptf_power.c index e1c242568341..0c081390930a 100644 --- a/drivers/acpi/dptf/dptf_power.c +++ b/drivers/acpi/dptf/dptf_power.c @@ -31,8 +31,7 @@ static ssize_t name##_show(struct device *dev,\ struct device_attribute *attr,\ char *buf)\ {\ - struct platform_device *pdev = to_platform_device(dev);\ - struct acpi_device *acpi_dev = platform_get_drvdata(pdev);\ + struct acpi_device *acpi_dev = dev_get_drvdata(dev);\ unsigned long long val;\ acpi_status status;\ \