From patchwork Mon Oct 9 17:29:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 150235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp2022533vqo; Mon, 9 Oct 2023 10:33:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDK/6WCRD5GDklYaCeacEfPY57K18Bzl6UGkYd+naVw+pFpQeIsPLfW0zvChxl6+ZrZnk/ X-Received: by 2002:a05:6a21:2716:b0:16b:75a6:4102 with SMTP id rm22-20020a056a21271600b0016b75a64102mr6687751pzb.46.1696872807148; Mon, 09 Oct 2023 10:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696872807; cv=none; d=google.com; s=arc-20160816; b=MQ6oxUhurNkX23x+ulEt13vu+NLMlIJV92r+tsi0+3nJ/lxSVi913/0R71t8JlQUhX yeIt0g8auhMxIRtLDbnVbTE4AxD3ttFoPX98vIX0cftyTT9b4Bydngoj4K1p7MlyOx5M e1WwuPQ/DqetB19c8jdruV3cn29tqqb59w8a/rcsMjo+2LvtmIIhs6gfbk3yhQ84DkGB 5TJqP2ygzkhdMx97wik5b3rFQE/UCrjOIA1dh/CdT4wZHEZR/oAx8oVvF28gS+MvvaeL 5LvG6RYiZEROVNRcv8L1ax/VRijXq816MCRH2LOEplShapntyg0uVQoTIvsgZ6KqJEH+ YCLA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=CNciBl1unEx/3kb9twB251Yak1j2TbhUkS71BhIOANI=; fh=mgAzcdefOIkORV+BGz3r5ObrtWmv1rnDxuH0PgYHvOQ=; b=XuEGGz4fUf/kNFX4EBf7d1YI8i9T0K7uvAaey0Hyld//Wx63i57vKYfcUki+y6DFeY QswemA5ArjaaRi1navYrPjOuVZnhD9nftsa49X3wpD5FZ8te6c/r1yl9wcHjZJ6NIpSu mCptDWqPgEpc3/E6j+uaYPjF/Ea9siMehY2m8rCfsEW7Ky1wV3ZscHldzg+w48rvDwvA nWrSaA/Xm65aJ2EzpnQEcuvbxiEU3+Pfo28hCJNNoz8l9WBUEPu0JAiVgwYN0RPZFdRh EIM7UrgYEhkzzP5kBDY/Nm8fHmqpEExsQQkHoVN+MS76oPat4DLmvBQuIAfS++WjIwh3 5wzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EcPaWquz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q4-20020a63d604000000b005829e84158dsi678650pgg.503.2023.10.09.10.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 10:33:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EcPaWquz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 26EEA8069D9D; Mon, 9 Oct 2023 10:33:26 -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 S1378126AbjJIRdQ (ORCPT + 18 others); Mon, 9 Oct 2023 13:33:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378110AbjJIRc7 (ORCPT ); Mon, 9 Oct 2023 13:32:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33039184; Mon, 9 Oct 2023 10:32:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64278C433CB; Mon, 9 Oct 2023 17:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696872772; bh=JQbWPDFsl0qN3wvjJzvnJTkMPT8Tve5fQAAfMjMgSmA=; h=From:To:Cc:Subject:Date:From; b=EcPaWquz30v0eQx4v7wpeCCivFKKYPuLfrITErlF9RNjiBTjCErFwD9riAKfpWQZW 8nsOyRjcOa947N9aLyuAG/D9t5A1Z8WRgYfHbLByHuVmU+g5CxCls7SWuMdmb6XuOJ THrY6jYRnqBWYJrQE76l3wHPRo5VzId8m43qTjaHEhhqqoG5QKHfKFJx2Q2RIua/qI inCbIHg/+mG9huqSNUuHOPZwL2M1dH2WwpMStvdWMS48mVywRWAUbe/m3YPdEVrTK4 8BTUdNN2jOxmOpqukCRgw/oWuYmpN63DEFsvy+Yw/xjtOSRN2AGrxCqyUwO38ApPMQ oaD8XNJbKMQpA== Received: (nullmailer pid 2533476 invoked by uid 1000); Mon, 09 Oct 2023 17:32:51 -0000 From: Rob Herring To: Sebastian Reichel Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] power: supply: cpcap: Drop non-DT driver matching Date: Mon, 9 Oct 2023 12:29:15 -0500 Message-ID: <20231009172923.2457844-20-robh@kernel.org> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham 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]); Mon, 09 Oct 2023 10:33:26 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779300100577151858 X-GMAIL-MSGID: 1779300100577151858 Only DT based probing is used for the Motorola CPCAP charger driver, so drop the !CONFIG_OF parts and redundant of_match_device() call. Signed-off-by: Rob Herring --- drivers/power/supply/cpcap-charger.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c index 431e951cccf0..cebca34ff872 100644 --- a/drivers/power/supply/cpcap-charger.c +++ b/drivers/power/supply/cpcap-charger.c @@ -17,8 +17,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -865,7 +864,6 @@ static const struct power_supply_desc cpcap_charger_usb_desc = { .property_is_writeable = cpcap_charger_property_is_writeable, }; -#ifdef CONFIG_OF static const struct of_device_id cpcap_charger_id_table[] = { { .compatible = "motorola,mapphone-cpcap-charger", @@ -873,20 +871,13 @@ static const struct of_device_id cpcap_charger_id_table[] = { {}, }; MODULE_DEVICE_TABLE(of, cpcap_charger_id_table); -#endif static int cpcap_charger_probe(struct platform_device *pdev) { struct cpcap_charger_ddata *ddata; - const struct of_device_id *of_id; struct power_supply_config psy_cfg = {}; int error; - of_id = of_match_device(of_match_ptr(cpcap_charger_id_table), - &pdev->dev); - if (!of_id) - return -EINVAL; - ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL); if (!ddata) return -ENOMEM; @@ -975,7 +966,7 @@ static struct platform_driver cpcap_charger_driver = { .probe = cpcap_charger_probe, .driver = { .name = "cpcap-charger", - .of_match_table = of_match_ptr(cpcap_charger_id_table), + .of_match_table = cpcap_charger_id_table, }, .shutdown = cpcap_charger_shutdown, .remove_new = cpcap_charger_remove,