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 6CFBF181BAE; Wed, 3 Jul 2024 11:06:26 +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=1720004786; cv=none; b=AzvKGkvt7MFKyhmIaIg7HH73v8u0O6EvjWEj7QU5+fbv3f3llvQ+f+Dd7XNSUg5bT+Zh+I5Hdz2LOzJzPRVi/GlEKgqjDV5veCQbpJ2v3j26so6T4oxBU6gqzF6Z4Hz+WPYmopljgcquRDnTroXUFG6OlqZ4PPms6amHl/+apjY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720004786; c=relaxed/simple; bh=DHNSAV+2Fs5PYlOMJhC7zectC3ggM2ZgJU5C6LGCqzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DasObj73IRUSUxGYqweM5SUP5yQCq4d4P2R8ed9Latp7YvnLnfxRxjibDs6Ta63m9bwzSqgM1eEGhmjEifkWonU/oYywwRZBXA1rFvBKkzFl/p1QvK2/UOKVXRomWqxM+YQymfcOkxQgrHUVb6/EyJdkNzGChTHFZL5H+Gblmgo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ehgJD15J; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ehgJD15J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6B09C2BD10; Wed, 3 Jul 2024 11:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1720004786; bh=DHNSAV+2Fs5PYlOMJhC7zectC3ggM2ZgJU5C6LGCqzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ehgJD15Jvsb6ZJccpLBVv2q/YmLx55ez7toLS7vgPuM93mwG0nY9UhoEugTOP8wnf fVI/cJ6lHvYU3RfY1tU88xbR9IZfSfTmyDONGhO7Z6er1XTgCKQQx6RBwlJe3An703 YE8QeO5gFUZWwWwRGmqwMtf6TWibn7fJmXPphCFg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Benson Leung , Prashant Malani , Krzysztof Kozlowski , Tzung-Bi Shih , Sebastian Reichel , Sasha Levin Subject: [PATCH 5.10 127/290] power: supply: cros_usbpd: provide ID table for avoiding fallback match Date: Wed, 3 Jul 2024 12:38:28 +0200 Message-ID: <20240703102908.984549387@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240703102904.170852981@linuxfoundation.org> References: <20240703102904.170852981@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ 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 0a4f02e4ae7ba..d7ee1eb9ca880 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