Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2409164rdh; Wed, 27 Sep 2023 01:26:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLPtnUHP/MPNHkIQyu58lF2TWXzjxw+2H6ENBw949t27uMV4J93IcXqAVSVhyT7w/zFgbT X-Received: by 2002:a25:b1a3:0:b0:d22:c8b9:8c9b with SMTP id h35-20020a25b1a3000000b00d22c8b98c9bmr1307955ybj.13.1695803201226; Wed, 27 Sep 2023 01:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695803201; cv=none; d=google.com; s=arc-20160816; b=C2ojfEa2JLAbnA+d8NJDxPXaI4AYGvNcMkVmH764MZyRKlM3lg9ltCRkpNcoVZ9DSQ nmMzjo490F5UNi6kHuP2H0AgrReSkqe8Qo79XPJawKG1KYqb2DUMrk+E4mJ14VFobPnC 4+NNqIqSS4X3UjJUbqKzrW47oU4Pf915JdbbGMIv/cVf6FZYBx0NEWtK9eZ7U3J0tN4k 4nDnB8eSJaiqoBgRDlBJxsbnJ5BEffZc1YcScrOL3CXc8Hx9qnPagl481yajwJzYJbdm JI4J2HWJ5EhgCDuj25k3HPH+CcNUXXC8nnLOKI7RrBI0gNHr8xvc97c2IhnZhXf3O94T Exlg== 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 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id be3-20020a656e43000000b005849fe1d3afsi4284285pgb.847.2023.09.27.01.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 01:26:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id C710981DE21F; Wed, 27 Sep 2023 01:13:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230231AbjI0IMo (ORCPT + 99 others); Wed, 27 Sep 2023 04:12:44 -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=20Kleine-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 Content-Type: text/plain; charset=UTF-8 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 Content-Transfer-Encoding: 8bit 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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,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 lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 01:13:08 -0700 (PDT) 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 */ -- 2.40.1