[media] v4l: atmel-isi: Remove support for platform data
All in-tree users have migrated to DT, remove support for platform data. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [josh.wu@atmel.com: squash the commit to remove the unused variable: dev] Signed-off-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
375123976f
commit
40a78f36fc
|
@ -23,12 +23,13 @@
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#include <media/atmel-isi.h>
|
|
||||||
#include <media/soc_camera.h>
|
#include <media/soc_camera.h>
|
||||||
#include <media/soc_mediabus.h>
|
#include <media/soc_mediabus.h>
|
||||||
#include <media/v4l2-of.h>
|
#include <media/v4l2-of.h>
|
||||||
#include <media/videobuf2-dma-contig.h>
|
#include <media/videobuf2-dma-contig.h>
|
||||||
|
|
||||||
|
#include "atmel-isi.h"
|
||||||
|
|
||||||
#define MAX_BUFFER_NUM 32
|
#define MAX_BUFFER_NUM 32
|
||||||
#define MAX_SUPPORT_WIDTH 2048
|
#define MAX_SUPPORT_WIDTH 2048
|
||||||
#define MAX_SUPPORT_HEIGHT 2048
|
#define MAX_SUPPORT_HEIGHT 2048
|
||||||
|
@ -881,7 +882,7 @@ static int atmel_isi_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int atmel_isi_probe_dt(struct atmel_isi *isi,
|
static int atmel_isi_parse_dt(struct atmel_isi *isi,
|
||||||
struct platform_device *pdev)
|
struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device_node *np= pdev->dev.of_node;
|
struct device_node *np= pdev->dev.of_node;
|
||||||
|
@ -928,16 +929,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
|
||||||
struct atmel_isi *isi;
|
struct atmel_isi *isi;
|
||||||
struct resource *regs;
|
struct resource *regs;
|
||||||
int ret, i;
|
int ret, i;
|
||||||
struct device *dev = &pdev->dev;
|
|
||||||
struct soc_camera_host *soc_host;
|
struct soc_camera_host *soc_host;
|
||||||
struct isi_platform_data *pdata;
|
|
||||||
|
|
||||||
pdata = dev->platform_data;
|
|
||||||
if ((!pdata || !pdata->data_width_flags) && !pdev->dev.of_node) {
|
|
||||||
dev_err(&pdev->dev,
|
|
||||||
"No config available for Atmel ISI\n");
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
isi = devm_kzalloc(&pdev->dev, sizeof(struct atmel_isi), GFP_KERNEL);
|
isi = devm_kzalloc(&pdev->dev, sizeof(struct atmel_isi), GFP_KERNEL);
|
||||||
if (!isi) {
|
if (!isi) {
|
||||||
|
@ -949,13 +941,9 @@ static int atmel_isi_probe(struct platform_device *pdev)
|
||||||
if (IS_ERR(isi->pclk))
|
if (IS_ERR(isi->pclk))
|
||||||
return PTR_ERR(isi->pclk);
|
return PTR_ERR(isi->pclk);
|
||||||
|
|
||||||
if (pdata) {
|
ret = atmel_isi_parse_dt(isi, pdev);
|
||||||
memcpy(&isi->pdata, pdata, sizeof(isi->pdata));
|
if (ret)
|
||||||
} else {
|
return ret;
|
||||||
ret = atmel_isi_probe_dt(isi, pdev);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
isi->active = NULL;
|
isi->active = NULL;
|
||||||
spin_lock_init(&isi->lock);
|
spin_lock_init(&isi->lock);
|
||||||
|
|
Loading…
Reference in New Issue