On Fri, 26 Mar 2010 16:03:26 +0530, "Agarwal, Preshit" <preshit.agarwal@xxxxxx> wrote: > In this patch SGX powervr_device is registered with it's platform specific > data to provide information about setting constraint through > omap_pm_set_min_bus_tput. > This patch removes the requirement of EXPORT_SYMBOL for the > omap_pm_set_min_bus_tput > function. > > Signed-off-by: Allen Pais <allen.pais@xxxxxx> > Signed-off-by: Preshit Agarwal <preshit.agarwal@xxxxxx> > --- > arch/arm/mach-omap2/devices.c | 26 > ++++++++++++++++++++++- > arch/arm/mach-omap2/include/mach/omap_sgxdef.h | 13 ++++++++++++ > 2 files changed, 37 insertions(+), 2 deletions(-) > create mode 100644 arch/arm/mach-omap2/include/mach/omap_sgxdef.h > > diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c > index 7131d8d..32a06b6 100644 > --- a/arch/arm/mach-omap2/devices.c > +++ b/arch/arm/mach-omap2/devices.c > @@ -26,7 +26,7 @@ > #include <plat/mux.h> > #include <mach/gpio.h> > #include <plat/mmc.h> > - > +#include <mach/omap_sgxdef.h> > #include "mux.h" > > #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) > @@ -773,6 +773,28 @@ static inline void omap_hdq_init(void) > static inline void omap_hdq_init(void) {} > #endif > > +struct sgx_platform_data omap_sgx_data = { > + .set_min_bus_tput = omap_pm_set_min_bus_tput, > +}; > + > +static struct platform_device powervr_device = { > + .name = "pvrsrvkm", > + .id = -1, > +#ifdef CONFIG_PM > + .dev = { > + .platform_data = &omap_sgx_data, > + } > +#else > + .dev = { > + .platform_data = NULL,} > +#endif it would be better that you move the ifdef to the implementation of omap_pm_set_min_bus_tput() and if I remember correctly, you're supposed to provide your own user of omap_pm_set_min_bus_tput() instead of just passing that to driver. So you would #ifdef CONFIG_PM static void omap_sgx_pm_constraints(struct device *dev) { return omap_pm_set_min_bus_tput(dev, blablablabla); } #else static inline void omap_sgx_pm_constrainsts(struct device *dev) { } #endif struct sgx_platform_data omap_sgx_data = { .set_min_bus_tput = omap_pm_set_min_bus_tput, }; static struct platform_device powervr_device = { .name = "pvrsrvkm", .id = -1, .dev = { .platform_data = &omap_sgx_data, }, }; -- balbi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html