public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] sbs-battery: Use of_match_ptr() macro
@ 2013-03-14 10:19 Sachin Kamat
       [not found] ` <CAK9yfHxFVb=ziKt5EPyFM6PSZqxGm4gYEFHBN1t1Yx=GOkUFtg@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2013-03-14 10:19 UTC (permalink / raw)
  To: linux-kernel; +Cc: dwmw2, anton.vorontsov, cbou, sachin.kamat

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

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/power/sbs-battery.c |    4 ++--
 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);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] sbs-battery: Use of_match_ptr() macro
       [not found] ` <CAK9yfHxFVb=ziKt5EPyFM6PSZqxGm4gYEFHBN1t1Yx=GOkUFtg@mail.gmail.com>
@ 2013-04-01  5:45   ` Anton Vorontsov
  0 siblings, 0 replies; 2+ messages in thread
From: Anton Vorontsov @ 2013-04-01  5:45 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: LKML, David Woodhouse

On Mon, Apr 01, 2013 at 09:02:28AM +0530, Sachin Kamat wrote:
[...]
> > -               .of_match_table = sbs_dt_ids,
> > +               .of_match_table = of_match_ptr(sbs_dt_ids),
> >         },
> >  };
> >  module_i2c_driver(sbs_battery_driver);
> > --
> > 1.7.4.1
>
> ping...

Applied, thanks!

Anton

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-01  5:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-14 10:19 [PATCH 1/1] sbs-battery: Use of_match_ptr() macro Sachin Kamat
     [not found] ` <CAK9yfHxFVb=ziKt5EPyFM6PSZqxGm4gYEFHBN1t1Yx=GOkUFtg@mail.gmail.com>
2013-04-01  5:45   ` Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox