From patchwork Wed Sep 27 08:10:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 145284 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2505648vqu; Wed, 27 Sep 2023 02:42:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErGI1Z2991pSWzQTzSAiezi984GaTQnTaYX2R8UKc2Z1bbX/NzwIxXFnue4f2z9sZra3Q4 X-Received: by 2002:a05:6358:99a9:b0:13c:dd43:f741 with SMTP id j41-20020a05635899a900b0013cdd43f741mr1051997rwb.24.1695807776534; Wed, 27 Sep 2023 02:42:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695807776; cv=none; d=google.com; s=arc-20160816; b=j4TmTurHSEp/UsXVSYSP2F5B/EExxUVz8F9Up5ViIcYTuu6VR2saKVq/BdZI2gaUMu zC+5EOdGsCPFJiCUECAJz9KEgVYp7bqnvs8XB3JJq2/036EzZ28vc8S2isLcRdxgFom2 o2m0AFmudQXsFkntvxf80WSHv5EqZoWn6CxiJeMQSlNnx0ZnbiQQkBSeHKAGihPb/Py5 YHKGQpvON6lr9jNMVbqaxyN2AAjrOWs/xFnA0LCUfKG9yOs27U7WH4YdnwsHypIsPYsk Zq1Iz8hvlmFLOQpFjZ7xtElB1Mqw+jIyrk75leYBxOX3a5SkTFP2/8fXbqghWvs0+D/M IWjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=R/V47a6F3MraEa8BQmlE5eglcY6Xgp2/K8j+JPIbpbA=; fh=2kkSTK4+HYKWTRWQ+Em0Wq821f+qWrh0O+CnTS97Wu4=; b=uVHS5Sqr/wDWt2ETy8YGoNAkZJZytWNCXNyqg9GMamkAZMKht9PSLG6A7nZI3DxOg0 7XOsV/mUa7vmQ+k4ct/MdXuCb8KTH8FmQDbZIJqTNpNSEtWIG/72QOGRL9LS6Xnb8Zc7 5Hv90GqXWHYyp1dBMEIti3lRe2i5Iml4nGxSDkRUaLOrwHDm7whpx/5rL/mFnLdWFr51 Oo0/pBN/6AvjdLonMVG1p/T6+YXYmrNz2EPmeFXLh8FPFhhZzg2klrqouzob66x8iMIo KcZAOpgVVo8YusY/BgOc8VqpM6MgpilWw2fYpR4UCK3GKPBkAmJf+DX1HmR0qGlk1+F6 xTWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id 17-20020a630211000000b00577d99bd04esi15174511pgc.313.2023.09.27.02.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 02:42:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6E407817C3D0; Wed, 27 Sep 2023 01:13:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230227AbjI0IMp (ORCPT + 23 others); Wed, 27 Sep 2023 04:12:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230169AbjI0ILE (ORCPT ); Wed, 27 Sep 2023 04:11:04 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A77C619A for ; Wed, 27 Sep 2023 01:10:59 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qlPdD-000892-Gs; Wed, 27 Sep 2023 10:10:51 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlPdC-009I8F-Pf; Wed, 27 Sep 2023 10:10:50 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qlPdC-005BRV-GP; Wed, 27 Sep 2023 10:10:50 +0200 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Gerd Haeussler , Xing Tong Wu , Tobias Schaffner , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Mark Gross Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 23/27] platform/x86/siemens: simatic-ipc-batt: Simplify simatic_ipc_batt_remove() Date: Wed, 27 Sep 2023 10:10:36 +0200 Message-Id: <20230927081040.2198742-24-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230927081040.2198742-1-u.kleine-koenig@pengutronix.de> References: <20230927081040.2198742-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4474; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=uUXb4B5hrdHXmnbVK9GlXIsjnQhNbsw+/k4ukKVrWu0=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlE+N4kwnW/Gz1Hb8gOU61vNE7HtCRpVAF86OF/ M/C+6XRZvCJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZRPjeAAKCRCPgPtYfRL+ TtseCACj0gQGeWiU0bRMvJ1gQPadWXcVIyxZ4FslwgDU1A1vYNjJrY7VDOKI2mf0WkCbiKzXMbj SRZEgEzPHToBhNmn5N8wVr2myrOHnM3b+dGZOcayR8ivOixBtHJFOdcwDFGyO0jNy1HK3WJ3e4U Zk+4C+9r6OziCcGW8ng5UqLLqvUHX3blw/TmP7o9XLPNrdUpQv+VM6MVRwYLeDCEWfYPG6hgSdD piaO23kG367PShsCxsSOLsz9ajcC29glH3Jm+szb28udEIjW3+ruzGShE9Gt+aw0qoWYvnb/cHi nbm6wBjeqog2eVq5XEkcTNIGZKmGKABbarxe8m5DwNeOd+qA X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 01:13:05 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778183335022845382 X-GMAIL-MSGID: 1778183335022845382 Instead of unconditionally returning zero, let simatic_ipc_batt_remove() return no value. This is a preparation to convert the drivers using this function to struct platform_driver::remove_new(). Signed-off-by: Uwe Kleine-König --- drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c | 4 +++- .../platform/x86/siemens/simatic-ipc-batt-elkhartlake.c | 4 +++- drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c | 4 +++- drivers/platform/x86/siemens/simatic-ipc-batt.c | 7 ++++--- drivers/platform/x86/siemens/simatic-ipc-batt.h | 4 ++-- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c b/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c index 8a67979d8f96..3e22a6bc9118 100644 --- a/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c +++ b/drivers/platform/x86/siemens/simatic-ipc-batt-apollolake.c @@ -27,7 +27,9 @@ static struct gpiod_lookup_table simatic_ipc_batt_gpio_table_127e = { static int simatic_ipc_batt_apollolake_remove(struct platform_device *pdev) { - return simatic_ipc_batt_remove(pdev, &simatic_ipc_batt_gpio_table_127e); + simatic_ipc_batt_remove(pdev, &simatic_ipc_batt_gpio_table_127e); + + return 0; } static int simatic_ipc_batt_apollolake_probe(struct platform_device *pdev) diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c b/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c index 607d033911a2..9e08c659f27d 100644 --- a/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c +++ b/drivers/platform/x86/siemens/simatic-ipc-batt-elkhartlake.c @@ -27,7 +27,9 @@ static struct gpiod_lookup_table simatic_ipc_batt_gpio_table_bx_21a = { static int simatic_ipc_batt_elkhartlake_remove(struct platform_device *pdev) { - return simatic_ipc_batt_remove(pdev, &simatic_ipc_batt_gpio_table_bx_21a); + simatic_ipc_batt_remove(pdev, &simatic_ipc_batt_gpio_table_bx_21a); + + return 0; } static int simatic_ipc_batt_elkhartlake_probe(struct platform_device *pdev) diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c b/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c index a66107e0fe1e..19c302a68911 100644 --- a/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c +++ b/drivers/platform/x86/siemens/simatic-ipc-batt-f7188x.c @@ -47,7 +47,9 @@ static struct gpiod_lookup_table simatic_ipc_batt_gpio_table_bx_59a = { static int simatic_ipc_batt_f7188x_remove(struct platform_device *pdev) { - return simatic_ipc_batt_remove(pdev, batt_lookup_table); + simatic_ipc_batt_remove(pdev, batt_lookup_table); + + return 0; } static int simatic_ipc_batt_f7188x_probe(struct platform_device *pdev) diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt.c b/drivers/platform/x86/siemens/simatic-ipc-batt.c index ef28c806b383..07cd4944de32 100644 --- a/drivers/platform/x86/siemens/simatic-ipc-batt.c +++ b/drivers/platform/x86/siemens/simatic-ipc-batt.c @@ -146,10 +146,9 @@ static const struct hwmon_chip_info simatic_ipc_batt_chip_info = { .info = simatic_ipc_batt_info, }; -int simatic_ipc_batt_remove(struct platform_device *pdev, struct gpiod_lookup_table *table) +void simatic_ipc_batt_remove(struct platform_device *pdev, struct gpiod_lookup_table *table) { gpiod_remove_lookup_table(table); - return 0; } EXPORT_SYMBOL_GPL(simatic_ipc_batt_remove); @@ -230,7 +229,9 @@ EXPORT_SYMBOL_GPL(simatic_ipc_batt_probe); static int simatic_ipc_batt_io_remove(struct platform_device *pdev) { - return simatic_ipc_batt_remove(pdev, NULL); + simatic_ipc_batt_remove(pdev, NULL); + + return 0; } static int simatic_ipc_batt_io_probe(struct platform_device *pdev) diff --git a/drivers/platform/x86/siemens/simatic-ipc-batt.h b/drivers/platform/x86/siemens/simatic-ipc-batt.h index 4545cd3e3026..89891db26a2c 100644 --- a/drivers/platform/x86/siemens/simatic-ipc-batt.h +++ b/drivers/platform/x86/siemens/simatic-ipc-batt.h @@ -14,7 +14,7 @@ int simatic_ipc_batt_probe(struct platform_device *pdev, struct gpiod_lookup_table *table); -int simatic_ipc_batt_remove(struct platform_device *pdev, - struct gpiod_lookup_table *table); +void simatic_ipc_batt_remove(struct platform_device *pdev, + struct gpiod_lookup_table *table); #endif /* _SIMATIC_IPC_BATT_H */