From patchwork Wed Dec 11 00:08:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 13902515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 401F8E77182 for ; Wed, 11 Dec 2024 00:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1rI1a5AIH1uXMzCw2VfoUY7iAdmXRhOEeW1I5hOno1A=; b=YEnj8GMiLYk8ZLEE94Uch6S4cQ LOoc6zT1N5lqXPPOkTmauy57NI8d1+n/WSPVlbtwekvAXs1hXwvasovXToUv4yY5tNk+3UwTSju3j uwVaiRSJVpIl1Jk2vD9QkyBqz3F8cepxPrJ3+Ej7FEP0sCPeLLxpWi3t6gEG1mYWKVsz6PoxcmC3d JckQHYUGRwCEzTGaXb1qWLA+a9+2rGKgXD5AYrzalsC4PNvDVESxS7v0LX9G9WsJ6riLGbwgkLGne 5NYTkswD6LfibabGcBXDosHeqDnJMjJAwZGuk+WaOSTh4SYY69+3vqjQBj6rvezb+fJcFI1mFpgRO N+tkZESA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tLAJP-0000000DFSy-117S; Wed, 11 Dec 2024 00:10:43 +0000 Received: from pv50p00im-ztdg10011901.me.com ([17.58.6.50]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tLAJM-0000000DFS8-3uJ9 for linux-mediatek@lists.infradead.org; Wed, 11 Dec 2024 00:10:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1733875840; bh=1rI1a5AIH1uXMzCw2VfoUY7iAdmXRhOEeW1I5hOno1A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=bMOeH5p23YhW74AKFEpoLDsJW67U4HGkbBi3eM1Z+R2b0zLxCLhaKJtMeY58vnx4X C6FxX6vhvMHi/ilwUgSScekcEdsyKxsqPwbTUU9CWZQlhd8+K8F6WAzUUJakJQ0kHv hJMT67g2in+durnKqH9ESbnwtRE0r/S49L6o5t/MyFumoqc3U79NgbIylbXyLOOlez 2gHwBIERmEoQCgNIfsJHgqX65R/D69nZUTcwiW83rC+NSpH2iswHOKAecnWTLhdT8l mk11aR6ZpZnd1L2SK5Ew+xwDMt/JKOYCNIyiZUR2lz8aT4UywmywB4OlyEVAvfaQgC Ap1bw3HGMP3Rw== Received: from [192.168.1.26] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10011901.me.com (Postfix) with ESMTPSA id 11FED3A00AE; Wed, 11 Dec 2024 00:10:29 +0000 (UTC) From: Zijun Hu Date: Wed, 11 Dec 2024 08:08:10 +0800 Subject: [PATCH v4 08/11] gpio: sim: Remove gpio_sim_dev_match_fwnode() MIME-Version: 1.0 Message-Id: <20241211-const_dfc_done-v4-8-583cc60329df@quicinc.com> References: <20241211-const_dfc_done-v4-0-583cc60329df@quicinc.com> In-Reply-To: <20241211-const_dfc_done-v4-0-583cc60329df@quicinc.com> To: Greg Kroah-Hartman Cc: Linus Walleij , Bartosz Golaszewski , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , James Bottomley , =?utf-8?q?Thomas_?= =?utf-8?q?Wei=C3=9Fschuh?= , Zijun Hu , linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev, linux-sound@vger.kernel.org, sparclinux@vger.kernel.org, linux-block@vger.kernel.org, linux-cxl@vger.kernel.org, linux1394-devel@lists.sourceforge.net, arm-scmi@vger.kernel.org, linux-efi@vger.kernel.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-media@vger.kernel.org, linux-pwm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, linux-serial@vger.kernel.org, netdev@vger.kernel.org, Zijun Hu X-Mailer: b4 0.14.2 X-Proofpoint-ORIG-GUID: qSPdOT9A5yTFi6DFCTYC3Xh7nIeW0dH9 X-Proofpoint-GUID: qSPdOT9A5yTFi6DFCTYC3Xh7nIeW0dH9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-12-10_13,2024-12-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 mlxscore=0 spamscore=0 mlxlogscore=816 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412100174 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241210_161040_991149_ED634EC7 X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Zijun Hu gpio_sim_dev_match_fwnode() is a simple wrapper of API device_match_fwnode(). Remove the needless wrapper and use the API instead. Signed-off-by: Zijun Hu Acked-by: Bartosz Golaszewski --- drivers/gpio/gpio-sim.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c index 370b71513bdb529112e157fa22a5451e02502a17..b1f33cbaaaa78aca324f99c45a868e7e79a9d672 100644 --- a/drivers/gpio/gpio-sim.c +++ b/drivers/gpio/gpio-sim.c @@ -413,11 +413,6 @@ static int gpio_sim_setup_sysfs(struct gpio_sim_chip *chip) return devm_add_action_or_reset(dev, gpio_sim_sysfs_remove, chip); } -static int gpio_sim_dev_match_fwnode(struct device *dev, const void *data) -{ - return device_match_fwnode(dev, data); -} - static int gpio_sim_add_bank(struct fwnode_handle *swnode, struct device *dev) { struct gpio_sim_chip *chip; @@ -503,7 +498,7 @@ static int gpio_sim_add_bank(struct fwnode_handle *swnode, struct device *dev) if (ret) return ret; - chip->dev = device_find_child(dev, swnode, gpio_sim_dev_match_fwnode); + chip->dev = device_find_child(dev, swnode, device_match_fwnode); if (!chip->dev) return -ENODEV;