Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2383350lqb; Mon, 27 May 2024 19:20:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFY9M0v7fwwLBAeFPOCJ9qaqIGvbtqJPd1ELNBghLtI87q0UxG1q91wAPP7EIdTn+DAFLyknLSg0bwFj3q6TZLKGUJwNL06ybqANEIXg== X-Google-Smtp-Source: AGHT+IHp8AwL7vdbCpRgZfWHKZckyC/ULwE+yo/WWA0UrbGdmw/yHrqFOseSJKZzw3/3Batmvoce X-Received: by 2002:a0d:dfc2:0:b0:61b:12:a587 with SMTP id 00721157ae682-62a08d744b1mr102740147b3.3.1716862829408; Mon, 27 May 2024 19:20:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716862829; cv=pass; d=google.com; s=arc-20160816; b=d0vbY0hw14dWyev8pAp4lSogF9e35bZY7tT9TOWcQRANqR9VEK8b0XmZjl/GWVjPvn puuqb23k0dBHxxF3RS9OTjH3yJ9zkj9SAnBg2iw/VqzXhV7pIlaGE+A0qwYZte4D1gqU SQQcMr33sOmvnpXH7HGFghio2Z04rS2y5kJmqUWouwkbt6hd2R6dJuPY1kmbVAfDeQr+ Wf8mZni4CW1qseDnHcvYCza6qX88hoMAM5gOrgT1e3xKIpwrwyBsNf2MtKtOviQkMi6C QdwS1Vuarcixt6uS+xYpUeC2REA2EuP1UrTPWXelfPCQV8WTWaHaocOY2SP+0HvSpoAk pxqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=YZSyQPVYiRZSKxNlbBNvTwOPwQgHsXZqsmgXWOXJxCM=; fh=jQUNAuWlXATPo4YcEj7zFnyeK2nlFvC3fiWVbu+C/uI=; b=w7HcVXG0OA/ewaxDnVcN9yN67FMbf0nUM94/CF4DMw6zACWk9gNpAAeNZrbQVjjgrb FBfjKRDqcw23bDvj8V10ePl0fQwyYfNnsGbyJMJleaNKcZkjZbXCa97vmiSiGEXeMXEJ IXIRbYR4sCzD+trOVwXZuRG0pJ2WWqgQs9jE9IdrKHVSgeiXKqPLaDVPGRT7tyClKuXp A9W1KOxlw6qASllFOlseNuYlJRR3K1NNc+hqvj5Jqe9pTRPUPpb4fmeqt8Xim5q9BwXz Y4Ue/rM95gQMvqvCYk6SSSPI3AA085jqzhSmG7scMfz1keYZYvLMPKdnEQQ+n4zlYrvJ Nlpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k3MwJj4v; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abd3b45asi926112485a.424.2024.05.27.19.20.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 19:20:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k3MwJj4v; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D54421C21A66 for ; Tue, 28 May 2024 02:20:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7576D44C7E; Tue, 28 May 2024 02:18:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k3MwJj4v" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9951A44C76; Tue, 28 May 2024 02:18:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716862738; cv=none; b=W9m56rtQqcZIuwtmBuBU/b3Ky32ssOrcwDoVGIjnlUymcpy9Ixyk2hkX9GuitmTN/E1xFuuTqK4uJK8dba1BCsKqYFXOeAiO0uCt+DJoZ77IsCe1WiYKPWgTv0MrAvWtm9EagBlWnNdZbRBYO/r3I5QAIBxiad1fBRAL5/inPnY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716862738; c=relaxed/simple; bh=fwEiQiX4cnxFfIKH2+2+aLGcHFwRzp3EH0PqQdljIpQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kS4W+gGZso2izjh1Yoxw5TPgFtUF/xfRdN+Jc71gGHqxeWHN9enhKqG6T4LeEbt4JGyydp52pJuvHgexg0lyBBOg25849G7QYdh27Tp2z07N+ds/Vuk00cS3r/FPu1Sxt4tVVDb5g3mzwKOBHQ9d7KS+zZzbWRyVYAIULvOYKWk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k3MwJj4v; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7531C2BBFC; Tue, 28 May 2024 02:18:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716862738; bh=fwEiQiX4cnxFfIKH2+2+aLGcHFwRzp3EH0PqQdljIpQ=; h=From:To:Cc:Subject:Date:From; b=k3MwJj4vNt+ASjRsgmr+DFjehx9VoPWYIOz29fUUY8g7bCNzYUMqyVNfS8b0v2/Ee c7Qo9xILYnqwbv6qm754pXdQYiBGCJoUJAOYt1NnFFbM5fTCLSJ0emZMD2iZ2IL2ul wfhkhCAuc+xJdrfnONS8bRU014q0PGGncGacI1AfwaQ/uyDzkboAMaBWp98votNLlK whslK0Eo/UXeTVpeaCR0lQ4MwVMTWqOZnnDwHvdgNaver6AoYttAv9GvFecFN0bgCY MC8aTeH+NUSZH/6SLfgNtss991An0M4HYqR21ELB2llXafmUwZFr4Arxb+TFmrmhUP jjU08e81FBB8g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tzung-Bi Shih , Benson Leung , Prashant Malani , Krzysztof Kozlowski , Sebastian Reichel , Sasha Levin , sre@kernel.org, linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 6.6 1/4] power: supply: cros_usbpd: provide ID table for avoiding fallback match Date: Mon, 27 May 2024 22:18:50 -0400 Message-ID: <20240528021854.3905245-1-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.32 Content-Transfer-Encoding: 8bit From: Tzung-Bi Shih [ Upstream commit 0f8678c34cbfdc63569a9b0ede1fe235ec6ec693 ] Instead of using fallback driver name match, provide ID table[1] for the primary match. [1]: https://elixir.bootlin.com/linux/v6.8/source/drivers/base/platform.c#L1353 Reviewed-by: Benson Leung Reviewed-by: Prashant Malani Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20240401030052.2887845-4-tzungbi@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin --- drivers/power/supply/cros_usbpd-charger.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/supply/cros_usbpd-charger.c index b6c96376776a9..8008e31c0c098 100644 --- a/drivers/power/supply/cros_usbpd-charger.c +++ b/drivers/power/supply/cros_usbpd-charger.c @@ -5,6 +5,7 @@ * Copyright (c) 2014 - 2018 Google, Inc */ +#include #include #include #include @@ -711,16 +712,22 @@ static int cros_usbpd_charger_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_usbpd_charger_pm_ops, NULL, cros_usbpd_charger_resume); +static const struct platform_device_id cros_usbpd_charger_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_usbpd_charger_id); + static struct platform_driver cros_usbpd_charger_driver = { .driver = { .name = DRV_NAME, .pm = &cros_usbpd_charger_pm_ops, }, - .probe = cros_usbpd_charger_probe + .probe = cros_usbpd_charger_probe, + .id_table = cros_usbpd_charger_id, }; module_platform_driver(cros_usbpd_charger_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ChromeOS EC USBPD charger"); -MODULE_ALIAS("platform:" DRV_NAME); -- 2.43.0