When OF is enabled, each driver should define a match table to allow the kernel to recognise drivers suitable for a given device. Initialization is carried out through a static inline at driver init time. The match-table is declared following OF bindings.
This patch adds the required initialization call to the versatile-i2c driver. Signed-off-by: Lorenzo Pieralisi <[email protected]> --- drivers/i2c/busses/i2c-versatile.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c index 6055601..ea8e3b5 100644 --- a/drivers/i2c/busses/i2c-versatile.c +++ b/drivers/i2c/busses/i2c-versatile.c @@ -133,6 +133,11 @@ static int i2c_versatile_remove(struct platform_device *dev) return 0; } +static struct of_device_id versatile_i2c_matches[] = { + { .compatible = "arm,versatile-i2c"}, + {}, +}; + static struct platform_driver i2c_versatile_driver = { .probe = i2c_versatile_probe, .remove = i2c_versatile_remove, @@ -144,6 +149,7 @@ static struct platform_driver i2c_versatile_driver = { static int __init i2c_versatile_init(void) { + platform_init_match(&i2c_versatile_driver, versatile_i2c_matches); return platform_driver_register(&i2c_versatile_driver); } -- 1.6.3.3 _______________________________________________ devicetree-discuss mailing list [email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
