Skip to content

Commit

Permalink
OMAPDSS: Change struct reg_field to dispc_reg_field
Browse files Browse the repository at this point in the history
Avoid colision with regmap's struct reg_field definition by renaming
omapdss's struct reg_field to dispc_reg_field, and moving it inside
dispc.c as that's the only place it is used.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Jyri Sarha authored and Tomi Valkeinen committed Apr 14, 2014
1 parent a57a22c commit 5c348ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 9 additions & 3 deletions drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,18 @@ enum mgr_reg_fields {
DISPC_MGR_FLD_NUM,
};

struct dispc_reg_field {
u16 reg;
u8 high;
u8 low;
};

static const struct {
const char *name;
u32 vsync_irq;
u32 framedone_irq;
u32 sync_lost_irq;
struct reg_field reg_desc[DISPC_MGR_FLD_NUM];
struct dispc_reg_field reg_desc[DISPC_MGR_FLD_NUM];
} mgr_desc[] = {
[OMAP_DSS_CHANNEL_LCD] = {
.name = "LCD",
Expand Down Expand Up @@ -242,13 +248,13 @@ static inline u32 dispc_read_reg(const u16 idx)

static u32 mgr_fld_read(enum omap_channel channel, enum mgr_reg_fields regfld)
{
const struct reg_field rfld = mgr_desc[channel].reg_desc[regfld];
const struct dispc_reg_field rfld = mgr_desc[channel].reg_desc[regfld];
return REG_GET(rfld.reg, rfld.high, rfld.low);
}

static void mgr_fld_write(enum omap_channel channel,
enum mgr_reg_fields regfld, int val) {
const struct reg_field rfld = mgr_desc[channel].reg_desc[regfld];
const struct dispc_reg_field rfld = mgr_desc[channel].reg_desc[regfld];
REG_FLD_MOD(rfld.reg, val, rfld.high, rfld.low);
}

Expand Down
6 changes: 0 additions & 6 deletions drivers/video/omap2/dss/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ struct dsi_clock_info {
u16 lp_clk_div;
};

struct reg_field {
u16 reg;
u8 high;
u8 low;
};

struct dss_lcd_mgr_config {
enum dss_io_pad_mode io_pad_mode;

Expand Down

0 comments on commit 5c348ba

Please sign in to comment.