summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-03-14 15:49:46 +0530
committerAnton Vorontsov <anton@enomsg.org>2013-03-31 20:37:26 -0700
commit075ed03ce6c2cd148b4606619e775c6e46aa89e1 (patch)
treecdf6347a0a649f4f52b813df507eda80ec55f65b /drivers/power
parent18bc4e79fdff1baa82d57ef364590fcdcc0a2612 (diff)
downloadop-kernel-dev-075ed03ce6c2cd148b4606619e775c6e46aa89e1.zip
op-kernel-dev-075ed03ce6c2cd148b4606619e775c6e46aa89e1.tar.gz
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 <sachin.kamat@linaro.org> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/sbs-battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c
index 3960f0b..3922f06 100644
--- a/drivers/power/sbs-battery.c
+++ b/drivers/power/sbs-battery.c
@@ -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);
OpenPOWER on IntegriCloud