Skip to content

Commit

Permalink
[VIDEO]: Fix section mismatch in cg3.c
Browse files Browse the repository at this point in the history
Fix section mismatch warning by moving data into __devinitdata section.
Add __devinit to initialization functions.

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Robert Reif authored and David S. Miller committed Mar 28, 2007
1 parent 7945d56 commit a717751
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions drivers/video/cg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ static int cg3_setcolreg(unsigned regno,
* @blank_mode: the blank mode we want.
* @info: frame buffer structure that represents a single frame buffer
*/
static int
cg3_blank(int blank, struct fb_info *info)
static int cg3_blank(int blank, struct fb_info *info)
{
struct cg3_par *par = (struct cg3_par *) info->par;
struct cg3_regs __iomem *regs = par->regs;
Expand Down Expand Up @@ -251,8 +250,8 @@ static int cg3_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
* Initialisation
*/

static void
cg3_init_fix(struct fb_info *info, int linebytes, struct device_node *dp)
static void __devinit cg3_init_fix(struct fb_info *info, int linebytes,
struct device_node *dp)
{
strlcpy(info->fix.id, dp->name, sizeof(info->fix.id));

Expand All @@ -264,8 +263,8 @@ cg3_init_fix(struct fb_info *info, int linebytes, struct device_node *dp)
info->fix.accel = FB_ACCEL_SUN_CGTHREE;
}

static void cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var,
struct device_node *dp)
static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var,
struct device_node *dp)
{
char *params;
char *p;
Expand All @@ -287,36 +286,36 @@ static void cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var,
}
}

static u8 cg3regvals_66hz[] __initdata = { /* 1152 x 900, 66 Hz */
static u8 cg3regvals_66hz[] __devinitdata = { /* 1152 x 900, 66 Hz */
0x14, 0xbb, 0x15, 0x2b, 0x16, 0x04, 0x17, 0x14,
0x18, 0xae, 0x19, 0x03, 0x1a, 0xa8, 0x1b, 0x24,
0x1c, 0x01, 0x1d, 0x05, 0x1e, 0xff, 0x1f, 0x01,
0x10, 0x20, 0
};

static u8 cg3regvals_76hz[] __initdata = { /* 1152 x 900, 76 Hz */
static u8 cg3regvals_76hz[] __devinitdata = { /* 1152 x 900, 76 Hz */
0x14, 0xb7, 0x15, 0x27, 0x16, 0x03, 0x17, 0x0f,
0x18, 0xae, 0x19, 0x03, 0x1a, 0xae, 0x1b, 0x2a,
0x1c, 0x01, 0x1d, 0x09, 0x1e, 0xff, 0x1f, 0x01,
0x10, 0x24, 0
};

static u8 cg3regvals_rdi[] __initdata = { /* 640 x 480, cgRDI */
static u8 cg3regvals_rdi[] __devinitdata = { /* 640 x 480, cgRDI */
0x14, 0x70, 0x15, 0x20, 0x16, 0x08, 0x17, 0x10,
0x18, 0x06, 0x19, 0x02, 0x1a, 0x31, 0x1b, 0x51,
0x1c, 0x06, 0x1d, 0x0c, 0x1e, 0xff, 0x1f, 0x01,
0x10, 0x22, 0
};

static u8 *cg3_regvals[] __initdata = {
static u8 *cg3_regvals[] __devinitdata = {
cg3regvals_66hz, cg3regvals_76hz, cg3regvals_rdi
};

static u_char cg3_dacvals[] __initdata = {
static u_char cg3_dacvals[] __devinitdata = {
4, 0xff, 5, 0x00, 6, 0x70, 7, 0x00, 0
};

static void cg3_do_default_mode(struct cg3_par *par)
static void __devinit cg3_do_default_mode(struct cg3_par *par)
{
enum cg3_type type;
u8 *p;
Expand Down Expand Up @@ -433,7 +432,8 @@ static int __devinit cg3_init_one(struct of_device *op)
return 0;
}

static int __devinit cg3_probe(struct of_device *dev, const struct of_device_id *match)
static int __devinit cg3_probe(struct of_device *dev,
const struct of_device_id *match)
{
struct of_device *op = to_of_device(&dev->dev);

Expand Down

0 comments on commit a717751

Please sign in to comment.