Skip to content

Commit

Permalink
sbs-battery: Use of_match_ptr() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Anton Vorontsov committed Apr 1, 2013
1 parent 18bc4e7 commit 075ed03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/power/sbs-battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -667,7 +668,6 @@ static struct sbs_platform_data *sbs_of_populate_pdata(
return pdata;
}
#else
#define sbs_dt_ids NULL
static struct sbs_platform_data *sbs_of_populate_pdata(
struct i2c_client *client)
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 075ed03

Please sign in to comment.