Re: [PATCH v2 6/8] media: camss: Set unused regulators to the empty set

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

 



On Sun, 9 Jan 2022 at 03:47, Bryan O'Donoghue
<bryan.odonoghue@xxxxxxxxxx> wrote:
>
> If a CAMSS block has no regulator set the regulator array to the empty set
> as opposed to setting the first element of the array to NULL.
>
> Suggested-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
> ---
>  drivers/media/platform/qcom/camss/camss.c | 60 +++++++++++------------
>  1 file changed, 30 insertions(+), 30 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 419c48c4f1d52..dcb37a739c95b 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -34,7 +34,7 @@
>  static const struct resources csiphy_res_8x16[] = {
>         /* CSIPHY0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer" },
>                 .clock_rate = { { 0 },
>                                 { 0 },
> @@ -46,7 +46,7 @@ static const struct resources csiphy_res_8x16[] = {
>
>         /* CSIPHY1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy1_timer" },
>                 .clock_rate = { { 0 },
>                                 { 0 },
> @@ -107,7 +107,7 @@ static const struct resources_ispif ispif_res_8x16 = {
>  static const struct resources vfe_res_8x16[] = {
>         /* VFE0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "vfe0", "csi_vfe0",
>                            "vfe_ahb", "vfe_axi", "ahb" },
>                 .clock_rate = { { 0 },
> @@ -129,7 +129,7 @@ static const struct resources vfe_res_8x16[] = {
>  static const struct resources csiphy_res_8x96[] = {
>         /* CSIPHY0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer" },
>                 .clock_rate = { { 0 },
>                                 { 0 },
> @@ -141,7 +141,7 @@ static const struct resources csiphy_res_8x96[] = {
>
>         /* CSIPHY1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy1_timer" },
>                 .clock_rate = { { 0 },
>                                 { 0 },
> @@ -153,7 +153,7 @@ static const struct resources csiphy_res_8x96[] = {
>
>         /* CSIPHY2 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy2_timer" },
>                 .clock_rate = { { 0 },
>                                 { 0 },
> @@ -249,7 +249,7 @@ static const struct resources_ispif ispif_res_8x96 = {
>  static const struct resources vfe_res_8x96[] = {
>         /* VFE0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ahb", "vfe0", "csi_vfe0", "vfe_ahb",
>                            "vfe0_ahb", "vfe_axi", "vfe0_stream"},
>                 .clock_rate = { { 0 },
> @@ -267,7 +267,7 @@ static const struct resources vfe_res_8x96[] = {
>
>         /* VFE1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ahb", "vfe1", "csi_vfe1", "vfe_ahb",
>                            "vfe1_ahb", "vfe_axi", "vfe1_stream"},
>                 .clock_rate = { { 0 },
> @@ -287,7 +287,7 @@ static const struct resources vfe_res_8x96[] = {
>  static const struct resources csiphy_res_660[] = {
>         /* CSIPHY0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy0_timer",
>                            "csi0_phy", "csiphy_ahb2crif" },
>                 .clock_rate = { { 0 },
> @@ -301,7 +301,7 @@ static const struct resources csiphy_res_660[] = {
>
>         /* CSIPHY1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy1_timer",
>                            "csi1_phy", "csiphy_ahb2crif" },
>                 .clock_rate = { { 0 },
> @@ -315,7 +315,7 @@ static const struct resources csiphy_res_660[] = {
>
>         /* CSIPHY2 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "top_ahb", "ispif_ahb", "ahb", "csiphy2_timer",
>                            "csi2_phy", "csiphy_ahb2crif" },
>                 .clock_rate = { { 0 },
> @@ -425,7 +425,7 @@ static const struct resources_ispif ispif_res_660 = {
>  static const struct resources vfe_res_660[] = {
>         /* VFE0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "throttle_axi", "top_ahb", "ahb", "vfe0",
>                            "csi_vfe0", "vfe_ahb", "vfe0_ahb", "vfe_axi",
>                            "vfe0_stream"},
> @@ -446,7 +446,7 @@ static const struct resources vfe_res_660[] = {
>
>         /* VFE1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "throttle_axi", "top_ahb", "ahb", "vfe1",
>                            "csi_vfe1", "vfe_ahb", "vfe1_ahb", "vfe_axi",
>                            "vfe1_stream"},
> @@ -469,7 +469,7 @@ static const struct resources vfe_res_660[] = {
>  static const struct resources csiphy_res_845[] = {
>         /* CSIPHY0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi", "soc_ahb", "slow_ahb_src",
>                                 "cpas_ahb", "cphy_rx_src", "csiphy0",
>                                 "csiphy0_timer_src", "csiphy0_timer" },
> @@ -487,7 +487,7 @@ static const struct resources csiphy_res_845[] = {
>
>         /* CSIPHY1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi", "soc_ahb", "slow_ahb_src",
>                                 "cpas_ahb", "cphy_rx_src", "csiphy1",
>                                 "csiphy1_timer_src", "csiphy1_timer" },
> @@ -505,7 +505,7 @@ static const struct resources csiphy_res_845[] = {
>
>         /* CSIPHY2 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi", "soc_ahb", "slow_ahb_src",
>                                 "cpas_ahb", "cphy_rx_src", "csiphy2",
>                                 "csiphy2_timer_src", "csiphy2_timer" },
> @@ -523,7 +523,7 @@ static const struct resources csiphy_res_845[] = {
>
>         /* CSIPHY3 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi", "soc_ahb", "slow_ahb_src",
>                                 "cpas_ahb", "cphy_rx_src", "csiphy3",
>                                 "csiphy3_timer_src", "csiphy3_timer" },
> @@ -605,7 +605,7 @@ static const struct resources csid_res_845[] = {
>  static const struct resources vfe_res_845[] = {
>         /* VFE0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi", "cpas_ahb", "slow_ahb_src",
>                                 "soc_ahb", "vfe0", "vfe0_axi",
>                                 "vfe0_src", "csi0",
> @@ -625,7 +625,7 @@ static const struct resources vfe_res_845[] = {
>
>         /* VFE1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi", "cpas_ahb", "slow_ahb_src",
>                                 "soc_ahb", "vfe1", "vfe1_axi",
>                                 "vfe1_src", "csi1",
> @@ -645,7 +645,7 @@ static const struct resources vfe_res_845[] = {
>
>         /* VFE-lite */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi", "cpas_ahb", "slow_ahb_src",
>                                 "soc_ahb", "vfe_lite",
>                                 "vfe_lite_src", "csi2",
> @@ -666,7 +666,7 @@ static const struct resources vfe_res_845[] = {
>  static const struct resources csiphy_res_8250[] = {
>         /* CSIPHY0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "csiphy0", "csiphy0_timer" },
>                 .clock_rate = { { 400000000 },
>                                 { 300000000 } },
> @@ -675,7 +675,7 @@ static const struct resources csiphy_res_8250[] = {
>         },
>         /* CSIPHY1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "csiphy1", "csiphy1_timer" },
>                 .clock_rate = { { 400000000 },
>                                 { 300000000 } },
> @@ -684,7 +684,7 @@ static const struct resources csiphy_res_8250[] = {
>         },
>         /* CSIPHY2 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "csiphy2", "csiphy2_timer" },
>                 .clock_rate = { { 400000000 },
>                                 { 300000000 } },
> @@ -693,7 +693,7 @@ static const struct resources csiphy_res_8250[] = {
>         },
>         /* CSIPHY3 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "csiphy3", "csiphy3_timer" },
>                 .clock_rate = { { 400000000 },
>                                 { 300000000 } },
> @@ -702,7 +702,7 @@ static const struct resources csiphy_res_8250[] = {
>         },
>         /* CSIPHY4 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "csiphy4", "csiphy4_timer" },
>                 .clock_rate = { { 400000000 },
>                                 { 300000000 } },
> @@ -711,7 +711,7 @@ static const struct resources csiphy_res_8250[] = {
>         },
>         /* CSIPHY5 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "csiphy5", "csiphy5_timer" },
>                 .clock_rate = { { 400000000 },
>                                 { 300000000 } },
> @@ -772,7 +772,7 @@ static const struct resources csid_res_8250[] = {
>  static const struct resources vfe_res_8250[] = {
>         /* VFE0 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb",
>                            "camnoc_axi", "vfe0_ahb", "vfe0_areg", "vfe0",
>                            "vfe0_axi", "cam_hf_axi" },
> @@ -790,7 +790,7 @@ static const struct resources vfe_res_8250[] = {
>         },
>         /* VFE1 */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb",
>                            "camnoc_axi", "vfe1_ahb", "vfe1_areg", "vfe1",
>                            "vfe1_axi", "cam_hf_axi" },
> @@ -808,7 +808,7 @@ static const struct resources vfe_res_8250[] = {
>         },
>         /* VFE2 (lite) */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb",
>                            "camnoc_axi", "vfe_lite_ahb", "vfe_lite_axi",
>                            "vfe_lite", "cam_hf_axi" },
> @@ -825,7 +825,7 @@ static const struct resources vfe_res_8250[] = {
>         },
>         /* VFE3 (lite) */
>         {
> -               .regulators = { NULL },
> +               .regulators = {},
>                 .clock = { "camnoc_axi_src", "slow_ahb_src", "cpas_ahb",
>                            "camnoc_axi", "vfe_lite_ahb", "vfe_lite_axi",
>                            "vfe_lite", "cam_hf_axi" },
> --

Thanks for the cleanup!

Reviewed-by: Robert Foss <robert.foss@xxxxxxxxxx>



[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