Re: [PATCH 32/35 linux-next] clk: constify of_device_id array

From: Fabian Frederick
Date: Sun Mar 22 2015 - 06:34:22 EST




> On 18 March 2015 at 15:15 Michael Turquette <mturquette@xxxxxxxxxx> wrote:
>
>
> Quoting Fabian Frederick (2015-03-16 12:59:06)
> > of_device_id is always used as const.
> > (See driver.of_match_table and open firmware functions)
> >
> > Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
>
> Acked-by: Michael Turquette <mturquette@xxxxxxxxxx>

Thanks :)

btw, something I forgot to mention in changelog is the __initdata -> __initconst
for ti_clkdm_match_table[]

I can send it again with a new changelog if necessary ...

Regards,
Fabian

>
> > ---
> > drivers/clk/clk-palmas.c        Â| 2 +-
> > drivers/clk/st/clkgen-fsyn.c      Â| 2 +-
> > drivers/clk/st/clkgen-mux.c       | 8 ++++----
> > drivers/clk/st/clkgen-pll.c       | 4 ++--
> > drivers/clk/ti/clk-dra7-atl.c      | 2 +-
> > drivers/clk/ti/clockdomain.c      Â| 2 +-
> >Â drivers/clk/versatile/clk-vexpress-osc.c | 2 +-
> >Â 7 files changed, 11 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/clk/clk-palmas.c b/drivers/clk/clk-palmas.c
> > index 8d45992..45a535a 100644
> > --- a/drivers/clk/clk-palmas.c
> > +++ b/drivers/clk/clk-palmas.c
> > @@ -161,7 +161,7 @@ static struct palmas_clks_of_match_data
> > palmas_of_clk32kgaudio = {
> >Â Â Â Â Â},
> >Â };
>
> > -static struct of_device_id palmas_clks_of_match[] = {
> > +static const struct of_device_id palmas_clks_of_match[] = {
> >Â Â Â Â Â{
> >Â Â Â Â Â Â Â Â Â.compatible = "ti,palmas-clk32kg",
> >Â Â Â Â Â Â Â Â Â.data = &palmas_of_clk32kg,
> > diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c
> > index af94ed8..a917c4c 100644
> > --- a/drivers/clk/st/clkgen-fsyn.c
> > +++ b/drivers/clk/st/clkgen-fsyn.c
> > @@ -1057,7 +1057,7 @@ static struct clk * __init
> > st_clk_register_quadfs_fsynth(
> >Â Â Â Â Âreturn clk;
> >Â }
>
> > -static struct of_device_id quadfs_of_match[] = {
> > +static const struct of_device_id quadfs_of_match[] = {
> >Â Â Â Â Â{
> >Â Â Â Â Â Â Â Â Â.compatible = "st,stih416-quadfs216",
> >Â Â Â Â Â Â Â Â Â.data = &st_fs216c65_416
> > diff --git a/drivers/clk/st/clkgen-mux.c b/drivers/clk/st/clkgen-mux.c
> > index 9a15ec3..fdcff10 100644
> > --- a/drivers/clk/st/clkgen-mux.c
> > +++ b/drivers/clk/st/clkgen-mux.c
> > @@ -341,7 +341,7 @@ static struct clkgena_divmux_data st_divmux_c32odf3 = {
> >Â Â Â Â Â.fb_start_bit_idx = 24,
> >Â };
>
> > -static struct of_device_id clkgena_divmux_of_match[] = {
> > +static const struct of_device_id clkgena_divmux_of_match[] = {
> >Â Â Â Â Â{
> >Â Â Â Â Â Â Â Â Â.compatible = "st,clkgena-divmux-c65-hs",
> >Â Â Â Â Â Â Â Â Â.data = &st_divmux_c65hs,
> > @@ -479,7 +479,7 @@ static struct clkgena_prediv_data prediv_c32_data = {
> >Â Â Â Â Â.table = prediv_table16,
> >Â };
>
> > -static struct of_device_id clkgena_prediv_of_match[] = {
> > +static const struct of_device_id clkgena_prediv_of_match[] = {
> >Â Â Â Â Â{ .compatible = "st,clkgena-prediv-c65", .data = &prediv_c65_data },
> >Â Â Â Â Â{ .compatible = "st,clkgena-prediv-c32", .data = &prediv_c32_data },
> >Â Â Â Â Â{}
> > @@ -586,7 +586,7 @@ static struct clkgen_mux_data stih407_a9_mux_data = {
> >Â Â Â Â Â.width = 2,
> >Â };
>
> > -static struct of_device_id mux_of_match[] = {
> > +static const struct of_device_id mux_of_match[] = {
> >Â Â Â Â Â{
> >Â Â Â Â Â Â Â Â Â.compatible = "st,stih416-clkgenc-vcc-hd",
> >Â Â Â Â Â Â Â Â Â.data = &clkgen_mux_c_vcc_hd_416,
> > @@ -693,7 +693,7 @@ static struct clkgen_vcc_data st_clkgenf_vcc_416 = {
> >Â Â Â Â Â.lock = &clkgenf_lock,
> >Â };
>
> > -static struct of_device_id vcc_of_match[] = {
> > +static const struct of_device_id vcc_of_match[] = {
> >Â Â Â Â Â{ .compatible = "st,stih416-clkgenc", .data = &st_clkgenc_vcc_416 },
> >Â Â Â Â Â{ .compatible = "st,stih416-clkgenf", .data = &st_clkgenf_vcc_416 },
> >Â Â Â Â Â{}
> > diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c
> > index 29769d7..d204ba8 100644
> > --- a/drivers/clk/st/clkgen-pll.c
> > +++ b/drivers/clk/st/clkgen-pll.c
> > @@ -593,7 +593,7 @@ static struct clk * __init clkgen_odf_register(const
> > char *parent_name,
> >Â Â Â Â Âreturn clk;
> >Â }
>
> > -static struct of_device_id c32_pll_of_match[] = {
> > +static const struct of_device_id c32_pll_of_match[] = {
> >Â Â Â Â Â{
> >Â Â Â Â Â Â Â Â Â.compatible = "st,plls-c32-a1x-0",
> >Â Â Â Â Â Â Â Â Â.data = &st_pll3200c32_a1x_0,
> > @@ -708,7 +708,7 @@ err:
> >Â }
> >Â CLK_OF_DECLARE(clkgen_c32_pll, "st,clkgen-plls-c32", clkgen_c32_pll_setup);
>
> > -static struct of_device_id c32_gpu_pll_of_match[] = {
> > +static const struct of_device_id c32_gpu_pll_of_match[] = {
> >Â Â Â Â Â{
> >Â Â Â Â Â Â Â Â Â.compatible = "st,stih415-gpu-pll-c32",
> >Â Â Â Â Â Â Â Â Â.data = &st_pll1200c32_gpu_415,
> > diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
> > index 59bb4b3..d86bc46 100644
> > --- a/drivers/clk/ti/clk-dra7-atl.c
> > +++ b/drivers/clk/ti/clk-dra7-atl.c
> > @@ -294,7 +294,7 @@ static int of_dra7_atl_clk_remove(struct platform_device
> > *pdev)
> >Â Â Â Â Âreturn 0;
> >Â }
>
> > -static struct of_device_id of_dra7_atl_clk_match_tbl[] = {
> > +static const struct of_device_id of_dra7_atl_clk_match_tbl[] = {
> >Â Â Â Â Â{ .compatible = "ti,dra7-atl", },
> >Â Â Â Â Â{},
> >Â };
> > diff --git a/drivers/clk/ti/clockdomain.c b/drivers/clk/ti/clockdomain.c
> > index b4c5fac..35fe108 100644
> > --- a/drivers/clk/ti/clockdomain.c
> > +++ b/drivers/clk/ti/clockdomain.c
> > @@ -52,7 +52,7 @@ static void __init of_ti_clockdomain_setup(struct
> > device_node *node)
> >Â Â Â Â Â}
> >Â }
>
> > -static struct of_device_id ti_clkdm_match_table[] __initdata = {
> > +static const struct of_device_id ti_clkdm_match_table[] __initconst = {
> >Â Â Â Â Â{ .compatible = "ti,clockdomain" },
> >Â Â Â Â Â{ }
> >Â };
> > diff --git a/drivers/clk/versatile/clk-vexpress-osc.c
> > b/drivers/clk/versatile/clk-vexpress-osc.c
> > index 765f1e0..89c0609 100644
> > --- a/drivers/clk/versatile/clk-vexpress-osc.c
> > +++ b/drivers/clk/versatile/clk-vexpress-osc.c
> > @@ -110,7 +110,7 @@ static int vexpress_osc_probe(struct platform_device
> > *pdev)
> >Â Â Â Â Âreturn 0;
> >Â }
>
> > -static struct of_device_id vexpress_osc_of_match[] = {
> > +static const struct of_device_id vexpress_osc_of_match[] = {
> >Â Â Â Â Â{ .compatible = "arm,vexpress-osc", },
> >Â Â Â Â Â{}
> >Â };
> > --
> > 2.1.0
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/