On Tue, 2012-08-21 at 16:36 +0530, Mahapatra, Chandrabhanu wrote:
On Tue, Aug 21, 2012 at 4:05 PM, Tomi Valkeinen [off-list ref] wrote:
quoted
On Mon, 2012-08-20 at 18:53 +0530, Chandrabhanu Mahapatra wrote:
quoted
All the cpu_is checks have been moved to dss_init_features function providing a
much more generic and cleaner interface. The OMAP version and revision specific
initializations in various functions are cleaned and the necessary data are
moved to dss_features structure which is local to dss.c.
Signed-off-by: Chandrabhanu Mahapatra <redacted>
---
drivers/video/omap2/dss/dss.c | 117 ++++++++++++++++++++++++++---------------
1 file changed, 76 insertions(+), 41 deletions(-)
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 10566ae..f6d3d0a 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -31,6 +31,7 @@
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
+#include <linux/gfp.h>
#include <video/omapdss.h>
@@ -65,6 +66,12 @@ struct dss_reg {
static int dss_runtime_get(void);
static void dss_runtime_put(void);
+struct dss_features {
+ u16 fck_div_max;
+ int dss_fck_multiplier;
+ char *clk_name;
const char *
Tomi
All the values are const. So we have a const pointer dss.feat to hold
this structure. Is a separate
const char *clk_name required?
Yes, the values are const, so the pointer itself is const. However, the
chars where the pointer points are not const. So:
feat.clk_name = 1234; // this is rejected by the compiler
feat.clk_name[0] = 0; // this would be accepted
Tomi