* [PATCH 1/2] of: address: use resource_size helper @ 2011-07-22 19:47 Felipe Balbi 2011-07-22 19:47 ` [PATCH 2/2] arm: omap: mark dt_compat __initconst Felipe Balbi 2011-08-01 11:55 ` [PATCH 1/2] of: address: use resource_size helper Grant Likely 0 siblings, 2 replies; 4+ messages in thread From: Felipe Balbi @ 2011-07-22 19:47 UTC (permalink / raw) To: linux-arm-kernel that should be the approved way of calculating the size of resources. No functional changes. Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Felipe Balbi <balbi@ti.com> --- drivers/of/address.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index deefc0c..6e7b2cf 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -624,6 +624,6 @@ void __iomem *of_iomap(struct device_node *np, int index) if (of_address_to_resource(np, index, &res)) return NULL; - return ioremap(res.start, 1 + res.end - res.start); + return ioremap(res.start, resource_size(&res)); } EXPORT_SYMBOL(of_iomap); -- 1.7.6 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] arm: omap: mark dt_compat __initconst 2011-07-22 19:47 [PATCH 1/2] of: address: use resource_size helper Felipe Balbi @ 2011-07-22 19:47 ` Felipe Balbi 2011-08-01 11:58 ` Grant Likely 2011-08-01 11:55 ` [PATCH 1/2] of: address: use resource_size helper Grant Likely 1 sibling, 1 reply; 4+ messages in thread From: Felipe Balbi @ 2011-07-22 19:47 UTC (permalink / raw) To: linux-arm-kernel we have a special section for const data which is only needed during init, that's __initconst. Use that instead of __initdata which is for non-const data. Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Felipe Balbi <balbi@ti.com> --- arch/arm/mach-omap2/board-igep0020.c | 2 +- arch/arm/mach-omap2/board-igep0030.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap4panda.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-zoom.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index eb198a6..d9888eb 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -703,7 +703,7 @@ static void __init igep2_init(void) } -static const char *igep2_dt_compat[] __initdata = { +static const char *igep2_dt_compat[] __initconst = { "ISEE,igep-v2", NULL }; diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index e13fdf0..984e4a1 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c @@ -447,7 +447,7 @@ static void __init igep3_init(void) } -static const char *igep3_dt_compat[] __initdata = { +static const char *igep3_dt_compat[] __initconst = { "ISEE,igep-v3", NULL }; diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index b9ad453..85ca38f 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -681,7 +681,7 @@ static void __init omap3_beagle_init(void) beagle_opp_init(); } -static const char *omap3_beagle_dt_match[] __initdata = { +static const char *omap3_beagle_dt_match[] __initconst = { "ti,omap3-beagle", NULL }; diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 47738db..58adeaf 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -741,7 +741,7 @@ static void __init omap4_panda_map_io(void) omap44xx_map_common_io(); } -static const char *omap4_panda_match[] __initdata = { +static const char *omap4_panda_match[] __initconst = { "ti,omap4-panda", NULL, }; diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index e91942a..e88f846 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c @@ -785,7 +785,7 @@ static void __init overo_init(void) "OVERO_GPIO_USBH_CPEN\n"); } -static const char *omap3_overo_dt_match[] __initdata = { +static const char *omap3_overo_dt_match[] __initconst = { "gumstix,omap3-overo", NULL }; diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c index 6cc9569..0627ea2 100644 --- a/arch/arm/mach-omap2/board-zoom.c +++ b/arch/arm/mach-omap2/board-zoom.c @@ -132,7 +132,7 @@ static void __init omap_zoom_init(void) zoom_display_init(); } -static const char *zoom3_dt_match[] __initdata = { +static const char *zoom3_dt_match[] __initconst = { "ti,zoom3", NULL }; -- 1.7.6 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] arm: omap: mark dt_compat __initconst 2011-07-22 19:47 ` [PATCH 2/2] arm: omap: mark dt_compat __initconst Felipe Balbi @ 2011-08-01 11:58 ` Grant Likely 0 siblings, 0 replies; 4+ messages in thread From: Grant Likely @ 2011-08-01 11:58 UTC (permalink / raw) To: linux-arm-kernel On Fri, Jul 22, 2011 at 10:47:22PM +0300, Felipe Balbi wrote: > we have a special section for const data > which is only needed during init, that's > __initconst. Use that instead of __initdata > which is for non-const data. > > Cc: Grant Likely <grant.likely@secretlab.ca> > Signed-off-by: Felipe Balbi <balbi@ti.com> Added to devicetree/test, thanks. g. > --- > arch/arm/mach-omap2/board-igep0020.c | 2 +- > arch/arm/mach-omap2/board-igep0030.c | 2 +- > arch/arm/mach-omap2/board-omap3beagle.c | 2 +- > arch/arm/mach-omap2/board-omap4panda.c | 2 +- > arch/arm/mach-omap2/board-overo.c | 2 +- > arch/arm/mach-omap2/board-zoom.c | 2 +- > 6 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c > index eb198a6..d9888eb 100644 > --- a/arch/arm/mach-omap2/board-igep0020.c > +++ b/arch/arm/mach-omap2/board-igep0020.c > @@ -703,7 +703,7 @@ static void __init igep2_init(void) > > } > > -static const char *igep2_dt_compat[] __initdata = { > +static const char *igep2_dt_compat[] __initconst = { > "ISEE,igep-v2", > NULL > }; > diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c > index e13fdf0..984e4a1 100644 > --- a/arch/arm/mach-omap2/board-igep0030.c > +++ b/arch/arm/mach-omap2/board-igep0030.c > @@ -447,7 +447,7 @@ static void __init igep3_init(void) > > } > > -static const char *igep3_dt_compat[] __initdata = { > +static const char *igep3_dt_compat[] __initconst = { > "ISEE,igep-v3", > NULL > }; > diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c > index b9ad453..85ca38f 100644 > --- a/arch/arm/mach-omap2/board-omap3beagle.c > +++ b/arch/arm/mach-omap2/board-omap3beagle.c > @@ -681,7 +681,7 @@ static void __init omap3_beagle_init(void) > beagle_opp_init(); > } > > -static const char *omap3_beagle_dt_match[] __initdata = { > +static const char *omap3_beagle_dt_match[] __initconst = { > "ti,omap3-beagle", > NULL > }; > diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c > index 47738db..58adeaf 100644 > --- a/arch/arm/mach-omap2/board-omap4panda.c > +++ b/arch/arm/mach-omap2/board-omap4panda.c > @@ -741,7 +741,7 @@ static void __init omap4_panda_map_io(void) > omap44xx_map_common_io(); > } > > -static const char *omap4_panda_match[] __initdata = { > +static const char *omap4_panda_match[] __initconst = { > "ti,omap4-panda", > NULL, > }; > diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c > index e91942a..e88f846 100644 > --- a/arch/arm/mach-omap2/board-overo.c > +++ b/arch/arm/mach-omap2/board-overo.c > @@ -785,7 +785,7 @@ static void __init overo_init(void) > "OVERO_GPIO_USBH_CPEN\n"); > } > > -static const char *omap3_overo_dt_match[] __initdata = { > +static const char *omap3_overo_dt_match[] __initconst = { > "gumstix,omap3-overo", > NULL > }; > diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c > index 6cc9569..0627ea2 100644 > --- a/arch/arm/mach-omap2/board-zoom.c > +++ b/arch/arm/mach-omap2/board-zoom.c > @@ -132,7 +132,7 @@ static void __init omap_zoom_init(void) > zoom_display_init(); > } > > -static const char *zoom3_dt_match[] __initdata = { > +static const char *zoom3_dt_match[] __initconst = { > "ti,zoom3", > NULL > }; > -- > 1.7.6 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] of: address: use resource_size helper 2011-07-22 19:47 [PATCH 1/2] of: address: use resource_size helper Felipe Balbi 2011-07-22 19:47 ` [PATCH 2/2] arm: omap: mark dt_compat __initconst Felipe Balbi @ 2011-08-01 11:55 ` Grant Likely 1 sibling, 0 replies; 4+ messages in thread From: Grant Likely @ 2011-08-01 11:55 UTC (permalink / raw) To: linux-arm-kernel On Fri, Jul 22, 2011 at 10:47:21PM +0300, Felipe Balbi wrote: > that should be the approved way of calculating > the size of resources. No functional changes. > > Cc: Grant Likely <grant.likely@secretlab.ca> > Signed-off-by: Felipe Balbi <balbi@ti.com> Applied, thanks. > --- > drivers/of/address.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/of/address.c b/drivers/of/address.c > index deefc0c..6e7b2cf 100644 > --- a/drivers/of/address.c > +++ b/drivers/of/address.c > @@ -624,6 +624,6 @@ void __iomem *of_iomap(struct device_node *np, int index) > if (of_address_to_resource(np, index, &res)) > return NULL; > > - return ioremap(res.start, 1 + res.end - res.start); > + return ioremap(res.start, resource_size(&res)); > } > EXPORT_SYMBOL(of_iomap); > -- > 1.7.6 > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-01 11:58 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-07-22 19:47 [PATCH 1/2] of: address: use resource_size helper Felipe Balbi 2011-07-22 19:47 ` [PATCH 2/2] arm: omap: mark dt_compat __initconst Felipe Balbi 2011-08-01 11:58 ` Grant Likely 2011-08-01 11:55 ` [PATCH 1/2] of: address: use resource_size helper Grant Likely
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).