linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: move media after i2c
@ 2009-04-21  7:22 Guennadi Liakhovetski
  2009-04-21  9:01 ` Jean Delvare
  0 siblings, 1 reply; 2+ messages in thread
From: Guennadi Liakhovetski @ 2009-04-21  7:22 UTC (permalink / raw)
  To: Linux Media Mailing List, linux-kernel, linux-i2c
  Cc: Mauro Carvalho Chehab, Greg KH, khali, Hans Verkuil

Currently drivers/media drivers are linked very early - directly after 
base, block, misc, and mfd and before ata, scsi, ide, input, firewire, 
usb, and i2c. This breaks static build of video4linux drivers, that use 
generic CPU i2c adapter drivers and the v4l2-subdev subsystem, because 
during video4linux probing the v4l2-subdev core requires a struct 
i2c_adapter context, which cannot be satisfied before the i2c subsystem is 
initialised. Moving drivers/media after drivers/i2c fixes this problem.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

The best way to trigger action is by submitting a patch:-) So, let's see 
what comes out of it - on the one hand I don't see any reason why media 
has to be linked this early, and nobody was able to give me one yesterday 
as this problem has been discussed on linux-media, OTOH, maybe indeed it 
would be better to move i2c the whole way up above media, but that'd be 
much bigger of a change, I think.

diff --git a/drivers/Makefile b/drivers/Makefile
index 2618a61..1266ead 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -36,7 +36,7 @@ obj-$(CONFIG_FB_INTEL)          += video/intelfb/
 
 obj-y				+= serial/
 obj-$(CONFIG_PARPORT)		+= parport/
-obj-y				+= base/ block/ misc/ mfd/ media/
+obj-y				+= base/ block/ misc/ mfd/
 obj-$(CONFIG_NUBUS)		+= nubus/
 obj-y				+= macintosh/
 obj-$(CONFIG_IDE)		+= ide/
@@ -71,7 +71,7 @@ obj-$(CONFIG_GAMEPORT)		+= input/gameport/
 obj-$(CONFIG_INPUT)		+= input/
 obj-$(CONFIG_I2O)		+= message/
 obj-$(CONFIG_RTC_LIB)		+= rtc/
-obj-y				+= i2c/
+obj-y				+= i2c/ media/
 obj-$(CONFIG_W1)		+= w1/
 obj-$(CONFIG_POWER_SUPPLY)	+= power/
 obj-$(CONFIG_HWMON)		+= hwmon/

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

* Re: [PATCH] drivers: move media after i2c
  2009-04-21  7:22 [PATCH] drivers: move media after i2c Guennadi Liakhovetski
@ 2009-04-21  9:01 ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2009-04-21  9:01 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Linux Media Mailing List, linux-kernel, linux-i2c,
	Mauro Carvalho Chehab, Greg KH, Hans Verkuil

On Tue, 21 Apr 2009 09:22:38 +0200 (CEST), Guennadi Liakhovetski wrote:
> Currently drivers/media drivers are linked very early - directly after 
> base, block, misc, and mfd and before ata, scsi, ide, input, firewire, 
> usb, and i2c. This breaks static build of video4linux drivers, that use 
> generic CPU i2c adapter drivers and the v4l2-subdev subsystem, because 
> during video4linux probing the v4l2-subdev core requires a struct 
> i2c_adapter context, which cannot be satisfied before the i2c subsystem is 
> initialised. Moving drivers/media after drivers/i2c fixes this problem.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Looks good to me.

Acked-by: Jean Delvare <khali@linux-fr.org>

> ---
> 
> The best way to trigger action is by submitting a patch:-) So, let's see 
> what comes out of it - on the one hand I don't see any reason why media 
> has to be linked this early, and nobody was able to give me one yesterday 
> as this problem has been discussed on linux-media, OTOH, maybe indeed it 
> would be better to move i2c the whole way up above media, but that'd be 
> much bigger of a change, I think.
> 
> diff --git a/drivers/Makefile b/drivers/Makefile
> index 2618a61..1266ead 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -36,7 +36,7 @@ obj-$(CONFIG_FB_INTEL)          += video/intelfb/
>  
>  obj-y				+= serial/
>  obj-$(CONFIG_PARPORT)		+= parport/
> -obj-y				+= base/ block/ misc/ mfd/ media/
> +obj-y				+= base/ block/ misc/ mfd/
>  obj-$(CONFIG_NUBUS)		+= nubus/
>  obj-y				+= macintosh/
>  obj-$(CONFIG_IDE)		+= ide/
> @@ -71,7 +71,7 @@ obj-$(CONFIG_GAMEPORT)		+= input/gameport/
>  obj-$(CONFIG_INPUT)		+= input/
>  obj-$(CONFIG_I2O)		+= message/
>  obj-$(CONFIG_RTC_LIB)		+= rtc/
> -obj-y				+= i2c/
> +obj-y				+= i2c/ media/
>  obj-$(CONFIG_W1)		+= w1/
>  obj-$(CONFIG_POWER_SUPPLY)	+= power/
>  obj-$(CONFIG_HWMON)		+= hwmon/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Jean Delvare

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

end of thread, other threads:[~2009-04-21  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-21  7:22 [PATCH] drivers: move media after i2c Guennadi Liakhovetski
2009-04-21  9:01 ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).