Commit 9c088c02 authored by David Heidelberg's avatar David Heidelberg Committed by Jonathan Cameron

iio: light: al3320a allow module autoload and polish

- allow autoloading when build as module and defined inside DT
Signed-off-by: default avatarDavid Heidelberg <david@ixit.cz>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 3a271275
......@@ -15,6 +15,7 @@
#include <linux/bitfield.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
......@@ -241,9 +242,16 @@ static const struct i2c_device_id al3320a_id[] = {
};
MODULE_DEVICE_TABLE(i2c, al3320a_id);
static const struct of_device_id al3320a_of_match[] = {
{ .compatible = "dynaimage,al3320a", },
{},
};
MODULE_DEVICE_TABLE(of, al3320a_of_match);
static struct i2c_driver al3320a_driver = {
.driver = {
.name = AL3320A_DRV_NAME,
.of_match_table = al3320a_of_match,
.pm = &al3320a_pm_ops,
},
.probe = al3320a_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment