From: Sachin Kamat Date: Thu, 14 Mar 2013 10:19:46 +0000 (+0530) Subject: sbs-battery: Use of_match_ptr() macro X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=075ed03ce6c2cd148b4606619e775c6e46aa89e1;p=linux-beck.git sbs-battery: Use of_match_ptr() macro This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat Signed-off-by: Anton Vorontsov --- diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c index 3960f0b2afe9..3922f06120c8 100644 --- a/drivers/power/sbs-battery.c +++ b/drivers/power/sbs-battery.c @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -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);