Skip to content

Commit

Permalink
macfb annotations and compiler warning fix
Browse files Browse the repository at this point in the history
Add some __iomem annotations. Remove some volatile qualifiers to fix 
several compiler warnings: "passing arg 1 of `iounmap' discards qualifiers 
from pointer target type".

Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
  • Loading branch information
Finn Thain authored and geertu committed Dec 28, 2008
1 parent 746e8d3 commit 3839d01
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions drivers/video/macfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,34 +77,34 @@ static int csc_setpalette (unsigned int regno, unsigned int red,
unsigned int green, unsigned int blue,
struct fb_info *fb_info);

static volatile struct {
static struct {
unsigned char addr;
/* Note: word-aligned */
char pad[3];
unsigned char lut;
} *valkyrie_cmap_regs;
} __iomem *valkyrie_cmap_regs;

static volatile struct {
static struct {
unsigned char addr;
unsigned char lut;
} *v8_brazil_cmap_regs;
} __iomem *v8_brazil_cmap_regs;

static volatile struct {
static struct {
unsigned char addr;
char pad1[3]; /* word aligned */
unsigned char lut;
char pad2[3]; /* word aligned */
unsigned char cntl; /* a guess as to purpose */
} *rbv_cmap_regs;
} __iomem *rbv_cmap_regs;

static volatile struct {
static struct {
unsigned long reset;
unsigned long pad1[3];
unsigned char pad2[3];
unsigned char lut;
} *dafb_cmap_regs;
} __iomem *dafb_cmap_regs;

static volatile struct {
static struct {
unsigned char addr; /* OFFSET: 0x00 */
unsigned char pad1[15];
unsigned char lut; /* OFFSET: 0x10 */
Expand All @@ -113,16 +113,16 @@ static volatile struct {
unsigned char pad3[7];
unsigned long vbl_addr; /* OFFSET: 0x28 */
unsigned int status2; /* OFFSET: 0x2C */
} *civic_cmap_regs;
} __iomem *civic_cmap_regs;

static volatile struct {
static struct {
char pad1[0x40];
unsigned char clut_waddr; /* 0x40 */
char pad2;
unsigned char clut_data; /* 0x42 */
char pad3[0x3];
unsigned char clut_raddr; /* 0x46 */
} *csc_cmap_regs;
} __iomem *csc_cmap_regs;

/* We will leave these the way they are for the time being */
struct mdc_cmap_regs {
Expand Down Expand Up @@ -506,10 +506,10 @@ static int csc_setpalette (unsigned int regno, unsigned int red,
struct fb_info *info)
{
mdelay(1);
csc_cmap_regs->clut_waddr = regno;
csc_cmap_regs->clut_data = red;
csc_cmap_regs->clut_data = green;
csc_cmap_regs->clut_data = blue;
nubus_writeb(regno, &csc_cmap_regs->clut_waddr);
nubus_writeb(red, &csc_cmap_regs->clut_data);
nubus_writeb(green, &csc_cmap_regs->clut_data);
nubus_writeb(blue, &csc_cmap_regs->clut_data);
return 0;
}

Expand Down

0 comments on commit 3839d01

Please sign in to comment.