All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] adp1653: make ->power() method optional
@ 2011-08-18  8:53 Andy Shevchenko
  2011-08-18  9:21 ` Sakari Ailus
  0 siblings, 1 reply; 18+ messages in thread
From: Andy Shevchenko @ 2011-08-18  8:53 UTC (permalink / raw)
  To: linux-media; +Cc: Andy Shevchenko, Sakari Ailus

The ->power() could be absent or not used on some platforms. This patch makes
its presence optional.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
---
 drivers/media/video/adp1653.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/adp1653.c b/drivers/media/video/adp1653.c
index 0fd9579..65f6f3f 100644
--- a/drivers/media/video/adp1653.c
+++ b/drivers/media/video/adp1653.c
@@ -309,6 +309,9 @@ __adp1653_set_power(struct adp1653_flash *flash, int on)
 {
 	int ret;
 
+	if (flash->platform_data->power == NULL)
+		return 0;
+
 	ret = flash->platform_data->power(&flash->subdev, on);
 	if (ret < 0)
 		return ret;
-- 
1.7.5.4


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

end of thread, other threads:[~2011-09-06 13:09 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-18  8:53 [PATCH] adp1653: make ->power() method optional Andy Shevchenko
2011-08-18  9:21 ` Sakari Ailus
2011-08-18 10:30   ` Andy Shevchenko
2011-08-18 10:53     ` Sakari Ailus
2011-08-18 11:00       ` Andy Shevchenko
2011-08-18 11:22   ` [PATCHv2] " Andy Shevchenko
2011-08-18 11:32     ` Andy Shevchenko
2011-08-18 11:51       ` Sakari Ailus
2011-08-18 13:32         ` Andy Shevchenko
2011-08-18 13:55           ` Sakari Ailus
2011-08-18 14:08             ` Sakari Ailus
2011-08-18 17:13           ` Sylwester Nawrocki
2011-08-18 19:02             ` Sakari Ailus
2011-08-18 20:59               ` Sylwester Nawrocki
2011-08-19 16:16                 ` Sakari Ailus
2011-08-19 20:24                   ` Sakari Ailus
2011-08-19 20:30                   ` Sylwester Nawrocki
2011-09-06 13:09           ` Sakari Ailus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.