Re: [PATCH v7 03/44] [media] omap3isp: get entity ID using media_entity_id()

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

 



Hello Shuah,

Thanks for your feedback.

On 08/24/2015 08:14 PM, Shuah Khan wrote:
> On Sun, Aug 23, 2015 at 2:17 PM, Mauro Carvalho Chehab
> <mchehab@xxxxxxxxxxxxxxx> wrote:
>> From: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
>>
>> X-Patchwork-Delegate: laurent.pinchart@xxxxxxxxxxxxxxxx
>> The struct media_entity does not have an .id field anymore since
>> now the entity ID is stored in the embedded struct media_gobj.
>>
>> This caused the omap3isp driver fail to build. Fix by using the
>> media_entity_id() macro to obtain the entity ID.
>>
>> Signed-off-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
>> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>
>>
>> diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
>> index 56e683b19a73..e08183f9d0f7 100644
>> --- a/drivers/media/platform/omap3isp/isp.c
>> +++ b/drivers/media/platform/omap3isp/isp.c
>> @@ -975,6 +975,7 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe)
>>         struct v4l2_subdev *subdev;
>>         int failure = 0;
>>         int ret;
>> +       u32 id;
>>
>>         /*
>>          * We need to stop all the modules after CCDC first or they'll
>> @@ -1027,8 +1028,10 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe)
>>                 if (ret) {
>>                         dev_info(isp->dev, "Unable to stop %s\n", subdev->name);
>>                         isp->stop_failure = true;
>> -                       if (subdev == &isp->isp_prev.subdev)
>> -                               isp->crashed |= 1U << subdev->entity.id;
>> +                       if (subdev == &isp->isp_prev.subdev) {
>> +                               id = media_entity_id(&subdev->entity);
>> +                               isp->crashed |= 1U << id;
> 
> Is there a reason why you need id defined here, unlike the cases
> below. Can you do
> 
> isp->crashed |= 1U << media_entity_id(&subdev->entity);
> 
>

Yes I could but due the indentation levels, that line length would be
way over the 80 columns convention. An alternative would had been to
break down in two lines but that would make it even less readable IMHO.

So I added that variable for readability and to make checkpatch.pl happy.

> 
> thanks,
> -- Shuah
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
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