lkml.org 
[lkml]   [2023]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1 02/14] media: qcom: camss: Start to move to module compat matched resources
From
On 14.08.2023 18:28, Bryan O'Donoghue wrote:
> There is a lot of unnecessary if/elsing in this code that arguably
> should never have made it upstream when adding a second let alone
> subsequent SoC.
>
> I'm guilty of not fixing the mess myself when adding in the sm8250.
> Before adding in any new SoCs or resources lets take the time to cleanup
> the resource passing.
>
> First step is to pass the generic struct camss_resources as a parameter
> per the compatible list.
>
> Subsequent patches will address the other somewhat dispirate strutures
> which we are also doing if/else on and assigning statically.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
[...]


> -
> for (i = 0; i < camss->csiphy_num; i++) {
> ret = msm_csiphy_subdev_init(camss, &camss->csiphy[i],
> - &csiphy_res[i], i);
> + &camss->res->csiphy_res[i], i);
&camss->res is used quite extensively, so I think it may be a good
idea to keep the variable there, just make it point to the correct
new thing.

Konrad

\
 
 \ /
  Last update: 2023-08-16 19:12    [W:0.257 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site