mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
staging: typec: fusb302: Fix module autoload
If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the OF and I2C device ID table entries as module aliases, using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/staging/typec/fusb302/fusb302.ko | grep alias $ After this patch: $ modinfo drivers/staging/typec/fusb302/fusb302.ko | grep alias alias: of:N*T*Cfcs,fusb302C* alias: of:N*T*Cfcs,fusb302 alias: i2c:typec_fusb302 Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c6a9d3eaee
commit
227383f8c2
|
|
@ -1787,11 +1787,13 @@ static const struct of_device_id fusb302_dt_match[] = {
|
|||
{.compatible = "fcs,fusb302"},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, fusb302_dt_match);
|
||||
|
||||
static const struct i2c_device_id fusb302_i2c_device_id[] = {
|
||||
{"typec_fusb302", 0},
|
||||
{},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, fusb302_i2c_device_id);
|
||||
|
||||
static const struct dev_pm_ops fusb302_pm_ops = {
|
||||
.suspend = fusb302_pm_suspend,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user