Re: [PATCH] pxa_camera: merge soc_mediabus.c into pxa_camera.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/21/2016 08:37 AM, Robert Jarzmik wrote:
> Hans Verkuil <hverkuil@xxxxxxxxx> writes:
> 
>> Linking soc_mediabus into this driver causes multiple definition linker warnings
>> if soc_camera is also enabled:
>>
>>    drivers/media/platform/soc_camera/built-in.o:(___ksymtab+soc_mbus_image_size+0x0): multiple definition of `__ksymtab_soc_mbus_image_size'
>>    drivers/media/platform/soc_camera/soc_mediabus.o:(___ksymtab+soc_mbus_image_size+0x0): first defined here
>>>> drivers/media/platform/soc_camera/built-in.o:(___ksymtab+soc_mbus_samples_per_pixel+0x0): multiple definition of `__ksymtab_soc_mbus_samples_per_pixel'
>>    drivers/media/platform/soc_camera/soc_mediabus.o:(___ksymtab+soc_mbus_samples_per_pixel+0x0): first defined here
>>    drivers/media/platform/soc_camera/built-in.o: In function `soc_mbus_config_compatible':
>>    (.text+0x3840): multiple definition of `soc_mbus_config_compatible'
>>    drivers/media/platform/soc_camera/soc_mediabus.o:(.text+0x134): first defined here
>>
>> Since we really don't want to have to use any of the soc-camera code this patch
>> copies the relevant code and data structures from soc_mediabus and renames it to pxa_mbus_*.
>>
>> The large table of formats has been culled a bit, removing formats that are not supported
>> by this driver.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
>> Cc: Robert Jarzmik <robert.jarzmik@xxxxxxx>
> 
> Hi Hans,
> 
> I wonder why you chose to copy-paste this code instead of adding in the Kconfig
> a "depends on !SOC_CAMERA". Any specific reason ? As this will have to be dealt
> with later anyway as you pointed out earlier, this format translation I mean, I
> was wondering if this was the best approach.

I thought about that, but that would make it impossible to COMPILE_TEST both the
pxa and the soc_camera driver. In addition, the pxa and soc_camera are the only
drivers that use this, and I prefer to just merge that code into pxa so that it can
be modified independently from soc_camera.

I really want to remove all dependencies to soc_camera. That will also make it easier
to refactor soc_camera once I get the atmel-isi driver out of soc_camera.

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux