From patchwork Sun Dec 24 10:06:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ognjen Galic X-Patchwork-Id: 10131913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 551A460594 for ; Sun, 24 Dec 2017 10:06:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B0BB28C4D for ; Sun, 24 Dec 2017 10:06:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FAB228C76; Sun, 24 Dec 2017 10:06:57 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 0EB8C28C6A for ; Sun, 24 Dec 2017 10:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751404AbdLXKGx (ORCPT ); Sun, 24 Dec 2017 05:06:53 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:37421 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbdLXKGv (ORCPT ); Sun, 24 Dec 2017 05:06:51 -0500 Received: by mail-wr0-f194.google.com with SMTP id f8so20493195wre.4; Sun, 24 Dec 2017 02:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=GB6ktifegAL9B//ECHOgiB4rsrv7/641X/aOLiL7AnY=; b=OSaW5NXa8gbtHtAWwmE8vfRtBH1Blxf26tereVU+Z7yGp7gNJKotG/aMJ+I8vXprGl m23sQMH23J44rh6gCXHeTgxStxOH1V9T0F/oAro38zlp09EEraKMSHRaxEVz997ncGvt bgFmcC8kbUIJTmFdmFEHgy/pyH6/gA4ZIMnviM0/VBMIzQmVHxKnIcOasbyvFXf/175r ajL3NsXOZTuElXiBGrz0pnUTdHfhWo/CXSiPQvSVcKfSByC66ql7K/pM5KGQFdWKeURn +zp6nIKPZebuDaR0BRO6kkM3TzyfXRIhADopJTVRKr1ji+FCrCVmS8aSbcOHlc6KrLJ1 o2oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=GB6ktifegAL9B//ECHOgiB4rsrv7/641X/aOLiL7AnY=; b=BfNe2A6FQqHprNtGTnPU6PFnXCmUgszw4NgeHTeaSkqk6iogEik/jcU4+dzXUYWFyd D7PrnyFcxnvwNphxQzInp3OFvftHX5iyPFU4yf9a3sVgCaNz4Tj2zq/zDehLWFqO1qeV FGjaIz81tiMIGUFJLv2niupFdUGnQF1pF9bibsrd+6/FZvkoJV6BlbD6g5DuW89ND2nF G6BhGg9/skeaVZZU6p/327Hpq7W6M/Ku44ckOTVB6jCmZXU16TFKFrW2P0DWlzw2dsPP 7RXeNRt4Ovf23K2fFlG9Ixn5sHsE4zY2e0uQhmz9FAqudVtJKY2m+Gbx1KUrIGhJKTc3 /gMA== X-Gm-Message-State: AKGB3mJsKW06MgzxWCxI1KX7IM6ZTXlZoQOLvPvArNTh0DmdjgXppy5t pGyScMRvgxdXDrDMQQWEucvDI5yI X-Google-Smtp-Source: ACJfBovEHA/eTJ6LXFwqdftdxVSc6ky45HCIsEnQkr0hb0QiduCdxGY47sWDQQKNwsuKCeuymVEmzA== X-Received: by 10.223.179.89 with SMTP id k25mr20048504wrd.146.1514110009843; Sun, 24 Dec 2017 02:06:49 -0800 (PST) Received: from thinkpad (pppoe-46-239-9-178.teol.net. [46.239.9.178]) by smtp.gmail.com with ESMTPSA id m68sm25129610wmi.28.2017.12.24.02.06.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Dec 2017 02:06:48 -0800 (PST) Date: Sun, 24 Dec 2017 11:06:47 +0100 From: Ognjen Galic To: Andy Shevchenko , "Rafael J. Wysocki" , Ognjen =?utf-8?B?R2FsacSH?= , "Rafael J. Wysocki" , Len Brown , Robert Moore , Lv Zheng , ACPI Devel Maling List , devel@acpica.org, Darren Hart , Andy Shevchenko , Henrique de Moraes Holschuh , Sebastian Reichel , Platform Driver , ibm-acpi-devel@lists.sourceforge.net, Linux PM Subject: [PATCH] pm: Fix build issues in ds278* (thinkpad_acpi) Message-ID: <20171224100647.GA13797@thinkpad> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) 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 This patch fixes a issue introduced by the thinkpad_acpi and battery patch series for charging thresholds. In that series, a new macro has been added to "include/linux/power_supply.h:374" called to_power_supply which is used to upcast from a struct device to a struct power_supply. That change conflicts with the private implementation of to_power_supply inside the ds2780 and ds2781 battery modules. This patch removes those private implementations and uses the new header one. After applying the thinkpad_acpi and battery patch series this must be applied to fix the build issues. This patch depends on: "[PATCH v10 2/4] pm: add to_power_supply macro to the API" Signed-off-by: Ognjen Galic --- drivers/power/supply/ds2780_battery.c | 5 ----- drivers/power/supply/ds2781_battery.c | 5 ----- 2 files changed, 10 deletions(-) diff --git a/drivers/power/supply/ds2780_battery.c b/drivers/power/supply/ds2780_battery.c index e5d81b4..370e910 100644 --- a/drivers/power/supply/ds2780_battery.c +++ b/drivers/power/supply/ds2780_battery.c @@ -56,11 +56,6 @@ to_ds2780_device_info(struct power_supply *psy) return power_supply_get_drvdata(psy); } -static inline struct power_supply *to_power_supply(struct device *dev) -{ - return dev_get_drvdata(dev); -} - static inline int ds2780_battery_io(struct ds2780_device_info *dev_info, char *buf, int addr, size_t count, int io) { diff --git a/drivers/power/supply/ds2781_battery.c b/drivers/power/supply/ds2781_battery.c index efe83ef..d1b5a19 100644 --- a/drivers/power/supply/ds2781_battery.c +++ b/drivers/power/supply/ds2781_battery.c @@ -54,11 +54,6 @@ to_ds2781_device_info(struct power_supply *psy) return power_supply_get_drvdata(psy); } -static inline struct power_supply *to_power_supply(struct device *dev) -{ - return dev_get_drvdata(dev); -} - static inline int ds2781_battery_io(struct ds2781_device_info *dev_info, char *buf, int addr, size_t count, int io) {