]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sbs-battery: Use of_match_ptr() macro
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 14 Mar 2013 10:19:46 +0000 (15:49 +0530)
committerAnton Vorontsov <anton@enomsg.org>
Mon, 1 Apr 2013 03:37:26 +0000 (20:37 -0700)
This eliminates having an #ifdef returning NULL for the case when OF is
disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/sbs-battery.c

index 3960f0b2afe97200ff8c8e95312de66b36060f0e..3922f06120c85e54374279ee7cd53eb4ac016813 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/gpio.h>
+#include <linux/of.h>
 
 #include <linux/power/sbs-battery.h>
 
@@ -667,7 +668,6 @@ of_out:
        return pdata;
 }
 #else
-#define sbs_dt_ids NULL
 static struct sbs_platform_data *sbs_of_populate_pdata(
        struct i2c_client *client)
 {
@@ -859,7 +859,7 @@ static struct i2c_driver sbs_battery_driver = {
        .id_table       = sbs_id,
        .driver = {
                .name   = "sbs-battery",
-               .of_match_table = sbs_dt_ids,
+               .of_match_table = of_match_ptr(sbs_dt_ids),
        },
 };
 module_i2c_driver(sbs_battery_driver);