pwm: atmel-hlcdc: workaround
Subsystems (2)
cover pwm: atmel-hlcdc: workaround
Hi all,
This patch enables the autoloading feature of atmel-hlcdc module. By registering MDT, the kernel is allowed to automatically bind modules to devices that match the specified compatible strings. This patch also drops trailing comma from definitions of device table arrays, which makes the code robust against misrebases.
Liao Chen (2):
pwm: atmel-hlcdc: Enable module autoloading
pwm: atmel-hlcdc: Drop trailing comma
drivers/pwm/pwm-atmel-hlcdc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/2 pwm: atmel-hlcdc: Enable module autoloading
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table.
--- drivers/pwm/pwm-atmel-hlcdc.c | 1 + 1 file changed, 1 insertion(+)
drivers/pwm/pwm-atmel-hlcdc.c +1 -0
@@ -290,6 +290,7 @@ static const struct of_device_id atmel_hlcdc_pwm_dt_ids[] = { { .compatible = "atmel,hlcdc-pwm" }, { /* sentinel */ }, }; +MODULE_DEVICE_TABLE (of, atmel_hlcdc_pwm_dt_ids);static struct platform_driver atmel_hlcdc_pwm_driver = { .driver = {
Signature · 1 line
2.34.1
PATCH 2/2 pwm: atmel-hlcdc: Drop trailing comma
In reply to Liao ChenDrop the trailing comma in the terminator entry for the ID table to make code robust against misrebases.
--- drivers/pwm/pwm-atmel-hlcdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pwm/pwm-atmel-hlcdc.c +2 -2
@@ -234,7 +234,7 @@ static const struct of_device_id atmel_hlcdc_dt_ids[] = { .data = &atmel_hlcdc_pwm_sama5d3_errata, }, { .compatible = "microchip,sam9x60-hlcdc", }, - { /* sentinel */ }, + {/* sentinel */ } };MODULE_DEVICE_TABLE (of, atmel_hlcdc_dt_ids);
@@ -288,7 +288,7 @@ static void atmel_hlcdc_pwm_remove(struct platform_device *pdev)static const struct of_device_id atmel_hlcdc_pwm_dt_ids[] = { { .compatible ="atmel,hlcdc-pwm" }, - {/* sentinel */ }, + {/* sentinel */ } };MODULE_DEVICE_TABLE (of, atmel_hlcdc_pwm_dt_ids);
Signature · 1 line
2.34.1
Hello,
Quoted 5 lines · Liao Chen
This patch enables the autoloading feature of atmel-hlcdc module. By registering MDT, the kernel is allowed to automatically bind modules to devices that match the specified compatible strings. This patch also drops trailing comma from definitions of device table arrays, which makes the code robust against misrebases.
Applied this series to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
Best regards and thanks for your contribution,
Uwe