summaryrefslogtreecommitdiffstats
path: root/drivers/video/mtl017.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/mtl017.c')
-rw-r--r--drivers/video/mtl017.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/mtl017.c b/drivers/video/mtl017.c
index 085ea110ba..c04875cd07 100644
--- a/drivers/video/mtl017.c
+++ b/drivers/video/mtl017.c
@@ -244,6 +244,9 @@ static int mtl017_probe(struct device_d *dev)
mtl017->client = to_i2c_client(dev);
mtl017->regulator = regulator_get(dev, "vdd");
+ if (IS_ERR(mtl017->regulator))
+ mtl017->regulator = NULL;
+
mtl017->enable_gpio = of_get_named_gpio_flags(dev->device_node,
"enable-gpios", 0, &flags);
if (gpio_is_valid(mtl017->enable_gpio)) {
@@ -265,8 +268,8 @@ static int mtl017_probe(struct device_d *dev)
return 0;
}
-static struct driver_d twl_driver = {
+static struct driver_d mtl_driver = {
.name = "mtl017",
.probe = mtl017_probe,
};
-device_i2c_driver(twl_driver);
+device_i2c_driver(mtl_driver);