Commit 54461c30 authored by Olof Johansson's avatar Olof Johansson Committed by Greg Kroah-Hartman

staging:iio: ak8975: add of_match table for device-tree probing

Just like isl29018; trivial addition. Using both asahi-kasei,ak8975 and
the non-prefixed version (I couldn't figure out if Asahi Kasei had a
stock symbol to use, I only found numerical indexes for their stock info).
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4ee19524
...@@ -564,9 +564,17 @@ static const struct i2c_device_id ak8975_id[] = { ...@@ -564,9 +564,17 @@ static const struct i2c_device_id ak8975_id[] = {
MODULE_DEVICE_TABLE(i2c, ak8975_id); MODULE_DEVICE_TABLE(i2c, ak8975_id);
static const struct of_device_id ak8975_of_match[] = {
{ .compatible = "asahi-kasei,ak8975", },
{ .compatible = "ak8975", },
{ }
};
MODULE_DEVICE_TABLE(of, ak8975_of_match);
static struct i2c_driver ak8975_driver = { static struct i2c_driver ak8975_driver = {
.driver = { .driver = {
.name = "ak8975", .name = "ak8975",
.of_match_table = ak8975_of_match,
}, },
.probe = ak8975_probe, .probe = ak8975_probe,
.remove = __devexit_p(ak8975_remove), .remove = __devexit_p(ak8975_remove),
......
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