mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00:00
[media] omap3: Add function to register omap3isp platform device structure
The omap3isp platform device requires platform data. Instead of registering the device in omap2_init_devices(), export an omap3_init_camera() function to fill the device structure with the platform data pointer and register the device. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
837c83283d
commit
a11f6706ca
2 changed files with 29 additions and 9 deletions
|
@ -34,6 +34,8 @@
|
||||||
#include "mux.h"
|
#include "mux.h"
|
||||||
#include "control.h"
|
#include "control.h"
|
||||||
|
|
||||||
|
#include "devices.h"
|
||||||
|
|
||||||
#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
|
#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
|
||||||
|
|
||||||
static struct resource cam_resources[] = {
|
static struct resource cam_resources[] = {
|
||||||
|
@ -59,8 +61,11 @@ static inline void omap_init_camera(void)
|
||||||
{
|
{
|
||||||
platform_device_register(&omap_cam_device);
|
platform_device_register(&omap_cam_device);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
#elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
|
static inline void omap_init_camera(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct resource omap3isp_resources[] = {
|
static struct resource omap3isp_resources[] = {
|
||||||
{
|
{
|
||||||
|
@ -146,15 +151,11 @@ static struct platform_device omap3isp_device = {
|
||||||
.resource = omap3isp_resources,
|
.resource = omap3isp_resources,
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void omap_init_camera(void)
|
int omap3_init_camera(struct isp_platform_data *pdata)
|
||||||
{
|
{
|
||||||
platform_device_register(&omap3isp_device);
|
omap3isp_device.dev.platform_data = pdata;
|
||||||
|
return platform_device_register(&omap3isp_device);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static inline void omap_init_camera(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
|
#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
|
||||||
|
|
||||||
|
|
19
arch/arm/mach-omap2/devices.h
Normal file
19
arch/arm/mach-omap2/devices.h
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
* arch/arm/mach-omap2/devices.h
|
||||||
|
*
|
||||||
|
* OMAP2 platform device setup/initialization
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ARCH_ARM_MACH_OMAP_DEVICES_H
|
||||||
|
#define __ARCH_ARM_MACH_OMAP_DEVICES_H
|
||||||
|
|
||||||
|
struct isp_platform_data;
|
||||||
|
|
||||||
|
int omap3_init_camera(struct isp_platform_data *pdata);
|
||||||
|
|
||||||
|
#endif
|
Loading…
Add table
Add a link
Reference in a new issue