Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 075ed03c authored by Sachin Kamat's avatar Sachin Kamat Committed by Anton Vorontsov
Browse files

sbs-battery: Use of_match_ptr() macro



This eliminates having an #ifdef returning NULL for the case when OF is
disabled.

Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent 18bc4e79
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 @@ 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)
{
@@ -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);