Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1473822lqb; Sun, 26 May 2024 02:44:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7nU1IBLjW8ztSxux4+gpIrrlH3JFb8dLyApOb7ZetD/RRjzwuzwbYiB/uzlsXb3UTqeN3JvPGoydQGArk3pXD4I3iMQZB6R37Qc/gHw== X-Google-Smtp-Source: AGHT+IHNb3v90Ugg8vfrHvYexxFq2b1zq9n1KK/2YcHEB8D/C16J4+IE7Q+REK/ZjIG6cwDUaGKc X-Received: by 2002:a17:906:2a05:b0:a5a:76e2:c2a8 with SMTP id a640c23a62f3a-a62646cd756mr424929866b.23.1716716654748; Sun, 26 May 2024 02:44:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716716654; cv=pass; d=google.com; s=arc-20160816; b=nvPKljoXQ8IQPYgyCaNJmpRvfsy8KX2hI0WpuVsSO1T9Z8xTHfOGY5DSMPbPJJrcYJ RgEuCqeN6PJ/0GRH7HajrxKuU/5s54f4rKmyGrDTgTGKL7TtzzV9PLi+IP+JtcV1uTJL 4HL+1lOGqiE5vl6Xt/A2izbrnxHISUvqrgFSom9VnM3rg3NeUdVWitgPDpxZpyLsYzjA ipHN5Bs/slAy5eb7m7Zb2yxb+EZPI3h08EuhglDLA3R/OxVqo/U8iVw+rXRv2l3cG8SW FtxqdBtcGBJIxADqp9fC4PGGR298KuDecKnvAW6xN0q1buigaLdnf6AMuZXjdrY9ulmx tmOA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=he9JAI9vK4adcaRA9M4QCLhAXf8rYNCuO2UKoniongk=; fh=gjYFDdIIaizjnWGUCW07S6JtTrUt4zhJEFThBvG8y80=; b=zZ+t29iQUmfmFDmoyAruFZ+Fl4XCHkIKeJW+Xarhik+bZ25PEqTo6WsekRZK+o6dYR Pa9ygSZGGKSbKPVdRb4dqvWOQHATB6UfYlSn5f076zGkjonaVyb//MY5eqlHkZF46Kwv gNFBlzzL1wf1P3s04uMnM8FjqFRMb3gVEgfiM4gx6+7GQc/47FijpA3hEIeayvPn7yz5 CdzUUp+jXksughU0Es3bwlwe6KaaRld3OijhXe9NK4QaUWy4nhpq4bnukcIxt/y3udGZ K/YOHhOxWuX72Uhncyx4rGICUhnQiPBaJd0yfursqCOUMDRD9s8s6xSN5LUjI6FcJ/9d MBRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H12PbXJR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189652-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cc66644si267845966b.606.2024.05.26.02.44.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 02:44:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=H12PbXJR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-189652-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189652-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4F5591F211D4 for ; Sun, 26 May 2024 09:44:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6646725774; Sun, 26 May 2024 09:42:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H12PbXJR" 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 8A7D522F0E; Sun, 26 May 2024 09:42:10 +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=1716716530; cv=none; b=WJ2ZS4uEGipmGAJBoU+I1dC8V08oxX5rxgCiKSVFstd39uXGLlM9unhHxCmhwdWWu2vX0secZyBwiHUEyhhfxFC67Crlfg5Av0NQ/ZWztSCK1Z3kAh1YdakLdKGwAm6y9N/uwoE0NWzH658w8DX2/B02RyVozsaDCJxrJlAJOGg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716716530; c=relaxed/simple; bh=yZCx+Ui138RWNHsw6N6p9WbGX2dhsHntqReUeJevRsg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qh3jzzJQwB14HWg0ffUvBaentVCsMEGot8GdN9t4QY0c3wqD6/bvKNLYYj4/7z24Owp5c96BjTblptP/vUq2wXfSlzxVKwj75H2AF/BH8ncZAIKtjgwrbXRht4ERyWzDrlZ505ebcWwbp0rmiQQK0wHYSBet1ya5k+zBeC8vK2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H12PbXJR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45A5AC2BD10; Sun, 26 May 2024 09:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716716530; bh=yZCx+Ui138RWNHsw6N6p9WbGX2dhsHntqReUeJevRsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H12PbXJRWwUs4qUrR7/UCM60O2drp95+uuo7qza9Letqy1VdivoJWZr6BSG+rFN+o 5O+WC3SiSsEtQurEXWN/7SitlObWFsB6A4ANxKEL7A3ggTqYoH7hZZQX7Se9eLqH7h srMF7IVYRGoOGKPzFral7El08dKjwR3Jx2bbkN5Tpt1LR0fhSAzUlPLQRQLdkcvddz fr9RPipfrSka9kAnXOC51jNKLlA/vB68rrGFKOYpeh9IPbw8BVZbiLTXGJyyAH83Z1 fohlRPYK/uIsazpEgiK0g/TxKReW5LpUeCb01Njv6oJDhMCHLlT2OPn1DM0N96GuNW UVTXrMqTa983g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tzung-Bi Shih , Benson Leung , Prashant Malani , Krzysztof Kozlowski , Sasha Levin , chrome-platform@lists.linux.dev Subject: [PATCH AUTOSEL 6.9 11/15] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match Date: Sun, 26 May 2024 05:41:43 -0400 Message-ID: <20240526094152.3412316-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240526094152.3412316-1-sashal@kernel.org> References: <20240526094152.3412316-1-sashal@kernel.org> 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.9.1 Content-Transfer-Encoding: 8bit From: Tzung-Bi Shih [ Upstream commit 8ad3b9652ed6a115c56214a0eab06952818b3ddf ] 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 Acked-by: Prashant Malani Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240329075630.2069474-8-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih Signed-off-by: Sasha Levin --- drivers/platform/chrome/cros_usbpd_notify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_usbpd_notify.c b/drivers/platform/chrome/cros_usbpd_notify.c index aacad022f21df..c83f81d86483c 100644 --- a/drivers/platform/chrome/cros_usbpd_notify.c +++ b/drivers/platform/chrome/cros_usbpd_notify.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include @@ -218,12 +219,19 @@ static void cros_usbpd_notify_remove_plat(struct platform_device *pdev) &pdnotify->nb); } +static const struct platform_device_id cros_usbpd_notify_id[] = { + { DRV_NAME, 0 }, + {} +}; +MODULE_DEVICE_TABLE(platform, cros_usbpd_notify_id); + static struct platform_driver cros_usbpd_notify_plat_driver = { .driver = { .name = DRV_NAME, }, .probe = cros_usbpd_notify_probe_plat, .remove_new = cros_usbpd_notify_remove_plat, + .id_table = cros_usbpd_notify_id, }; static int __init cros_usbpd_notify_init(void) @@ -258,4 +266,3 @@ module_exit(cros_usbpd_notify_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ChromeOS power delivery notifier device"); MODULE_AUTHOR("Jon Flatley "); -MODULE_ALIAS("platform:" DRV_NAME); -- 2.43.0