[media] s5p-fimc: Remove unneeded fields from struct fimc_dev
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Sat, 17 Mar 2012 21:31:33 +0000 (18:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 10 Apr 2012 18:24:20 +0000 (15:24 -0300)
irq is used only locally and num_clocks is constant, so remove them.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/s5p-fimc/fimc-core.c
drivers/media/video/s5p-fimc/fimc-core.h

index 21691e4ee5538b74d18963952a998182f56519fe..4d6b86791187ab405ea19a9b5eeb6f3bb3f175a4 100644 (file)
@@ -1559,7 +1559,7 @@ void fimc_unregister_m2m_device(struct fimc_dev *fimc)
 static void fimc_clk_put(struct fimc_dev *fimc)
 {
        int i;
-       for (i = 0; i < fimc->num_clocks; i++) {
+       for (i = 0; i < MAX_FIMC_CLOCKS; i++) {
                if (IS_ERR_OR_NULL(fimc->clock[i]))
                        continue;
                clk_unprepare(fimc->clock[i]);
@@ -1572,7 +1572,7 @@ static int fimc_clk_get(struct fimc_dev *fimc)
 {
        int i, ret;
 
-       for (i = 0; i < fimc->num_clocks; i++) {
+       for (i = 0; i < MAX_FIMC_CLOCKS; i++) {
                fimc->clock[i] = clk_get(&fimc->pdev->dev, fimc_clocks[i]);
                if (IS_ERR(fimc->clock[i]))
                        goto err;
@@ -1672,9 +1672,7 @@ static int fimc_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "Failed to get IRQ resource\n");
                return -ENXIO;
        }
-       fimc->irq = res->start;
 
-       fimc->num_clocks = MAX_FIMC_CLOCKS;
        ret = fimc_clk_get(fimc);
        if (ret)
                return ret;
@@ -1683,7 +1681,7 @@ static int fimc_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, fimc);
 
-       ret = devm_request_irq(&pdev->dev, fimc->irq, fimc_irq_handler,
+       ret = devm_request_irq(&pdev->dev, res->start, fimc_irq_handler,
                               0, pdev->name, fimc);
        if (ret) {
                dev_err(&pdev->dev, "failed to install irq (%d)\n", ret);
index 101c930f08b8d83b736f92f1fd0676318c94c2cf..193e8f603949509ae003af7b36d23a757b896dc2 100644 (file)
@@ -429,10 +429,8 @@ struct fimc_ctx;
  * @pdata:     pointer to the device platform data
  * @variant:   the IP variant information
  * @id:                FIMC device index (0..FIMC_MAX_DEVS)
- * @num_clocks: the number of clocks managed by this device instance
  * @clock:     clocks required for FIMC operation
  * @regs:      the mapped hardware registers
- * @irq:       FIMC interrupt number
  * @irq_queue: interrupt handler waitqueue
  * @v4l2_dev:  root v4l2_device
  * @m2m:       memory-to-memory V4L2 device information
@@ -448,10 +446,8 @@ struct fimc_dev {
        struct s5p_platform_fimc        *pdata;
        struct samsung_fimc_variant     *variant;
        u16                             id;
-       u16                             num_clocks;
        struct clk                      *clock[MAX_FIMC_CLOCKS];
        void __iomem                    *regs;
-       int                             irq;
        wait_queue_head_t               irq_queue;
        struct v4l2_device              *v4l2_dev;
        struct fimc_m2m_device          m2m;