mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 06:43:09 +00:00
platform/chrome: cros_ec_vbc: provide ID table for avoiding fallback match
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: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Benson Leung <bleung@chromium.org> Link: https://lore.kernel.org/r/20240329075630.2069474-14-tzungbi@kernel.org Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
This commit is contained in:
parent
0524814b60
commit
0cb7b2639a
@ -6,6 +6,7 @@
|
||||
|
||||
#include <linux/of.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_data/cros_ec_commands.h>
|
||||
#include <linux/platform_data/cros_ec_proto.h>
|
||||
@ -133,16 +134,22 @@ static void cros_ec_vbc_remove(struct platform_device *pd)
|
||||
&cros_ec_vbc_attr_group);
|
||||
}
|
||||
|
||||
static const struct platform_device_id cros_ec_vbc_id[] = {
|
||||
{ DRV_NAME, 0 },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(platform, cros_ec_vbc_id);
|
||||
|
||||
static struct platform_driver cros_ec_vbc_driver = {
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
},
|
||||
.probe = cros_ec_vbc_probe,
|
||||
.remove_new = cros_ec_vbc_remove,
|
||||
.id_table = cros_ec_vbc_id,
|
||||
};
|
||||
|
||||
module_platform_driver(cros_ec_vbc_driver);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Expose the vboot context nvram to userspace");
|
||||
MODULE_ALIAS("platform:" DRV_NAME);
|
||||
|
Loading…
Reference in New Issue
Block a user