i2c: sprd: Add missing MODULE_DEVICE_TABLE
authorBixuan Cui <cuibixuan@huawei.com>
Sat, 10 Apr 2021 03:50:44 +0000 (11:50 +0800)
committerWolfram Sang <wsa@kernel.org>
Tue, 13 Apr 2021 12:34:58 +0000 (14:34 +0200)
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-sprd.c

index 2917fec..9f77d1d 100644 (file)
@@ -640,6 +640,7 @@ static const struct of_device_id sprd_i2c_of_match[] = {
        { .compatible = "sprd,sc9860-i2c", },
        {},
 };
+MODULE_DEVICE_TABLE(of, sprd_i2c_of_match);
 
 static struct platform_driver sprd_i2c_driver = {
        .probe = sprd_i2c_probe,