From mboxrd@z Thu Jan 1 00:00:00 1970 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 D0D4A4EB20; Sun, 26 May 2024 09:42:41 +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=1716716561; cv=none; b=bLq3/InCuTZy1H5Tf8ppwiJdO5/n1rK0beJ9IaoIaFGoaBdYSdemsyHZClhAwC7KC1b+1BMJ1zlj4NWUoA4gq6EWMpVWDRJjmE0d8WKbgPTCz+6q5D6B+h8vmXA9Bw7UPGK/bB8KS0djSkfKu2RvjtXjmOP1TgXXMwoLtCN/1Fs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716716561; c=relaxed/simple; bh=yZCx+Ui138RWNHsw6N6p9WbGX2dhsHntqReUeJevRsg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e5f6onhXUE7aJ5re/sOTm5lDAUsSJS7vFN0LvC9cEfhNBNzZuHZpUTqndHU59uw6va4RQWNAhVNgmVomj5R5QArzG5P0rQFJ1hPr7WmZ6NgCeRY4sDNsE6CiMMXGUoeJdbxnA5U1zoju5gHnsTr2TvjzA/dIjTizHoyYS6NaqHk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FQwuqhfC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FQwuqhfC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCC6DC32781; Sun, 26 May 2024 09:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716716561; bh=yZCx+Ui138RWNHsw6N6p9WbGX2dhsHntqReUeJevRsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FQwuqhfCdyNrApf6+1t0Ebak75V9be+zAlfWWCzBgH/1jXZCbLpYfMCNpjXIAj6J5 skDe8adFDeCtxlOS3oB5vpYjdMI5vhu63NjNe/DPDzVFG222srwiXHZC1qPpjEOreV 5Eo71NHg/Bhy8+lb+9YzbjG/z/42vhtuN1RaOF/krz6o4ABvAHLXTUB8+TaPGrUknl 1M8w5PIHHzgeMy0HwnVBidGdfhiGFS0na1qJBVE2uRbJ05GzF+nLSsDfNUDtDZ6+mg t+X4iXjk0w8U5APVTJSHpKboERCN0fDJUVGGh5Dpuq/KFmzzzFkiAUn/3J6Pv3Rgfz tXSw1x+cLroeg== 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.8 11/14] platform/chrome: cros_usbpd_notify: provide ID table for avoiding fallback match Date: Sun, 26 May 2024 05:42:16 -0400 Message-ID: <20240526094224.3412675-11-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240526094224.3412675-1-sashal@kernel.org> References: <20240526094224.3412675-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@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.8.10 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