Skip to content

Commit

Permalink
lxfb: fix incorrect __init annotation
Browse files Browse the repository at this point in the history
WARNING: vmlinux.o(.data+0x196e8): Section mismatch in reference from the
variable lxfb_driver to the function .init.text:lxfb_probe() The variable
lxfb_driver references the function __init lxfb_probe()

This changes lxfb_probe and friends to use __devinit, and also adds
__devexit to lxfb_remove.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andres Salomon authored and Linus Torvalds committed Jun 29, 2010
1 parent 500ebb8 commit 12c46b3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions drivers/video/geode/lxfb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static int vt_switch;
* we try to make it something sane - 640x480-60 is sane
*/

static struct fb_videomode geode_modedb[] __initdata = {
static struct fb_videomode geode_modedb[] __devinitdata = {
/* 640x480-60 */
{ NULL, 60, 640, 480, 39682, 48, 8, 25, 2, 88, 2,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
Expand Down Expand Up @@ -219,14 +219,15 @@ static struct fb_videomode geode_modedb[] __initdata = {
#ifdef CONFIG_OLPC
#include <asm/olpc.h>

static struct fb_videomode olpc_dcon_modedb[] __initdata = {
static struct fb_videomode olpc_dcon_modedb[] __devinitdata = {
/* The only mode the DCON has is 1200x900 */
{ NULL, 50, 1200, 900, 17460, 24, 8, 4, 5, 8, 3,
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
FB_VMODE_NONINTERLACED, 0 }
};

static void __init get_modedb(struct fb_videomode **modedb, unsigned int *size)
static void __devinit get_modedb(struct fb_videomode **modedb,
unsigned int *size)
{
if (olpc_has_dcon()) {
*modedb = (struct fb_videomode *) olpc_dcon_modedb;
Expand All @@ -238,7 +239,8 @@ static void __init get_modedb(struct fb_videomode **modedb, unsigned int *size)
}

#else
static void __init get_modedb(struct fb_videomode **modedb, unsigned int *size)
static void __devinit get_modedb(struct fb_videomode **modedb,
unsigned int *size)
{
*modedb = (struct fb_videomode *) geode_modedb;
*size = ARRAY_SIZE(geode_modedb);
Expand Down Expand Up @@ -334,7 +336,7 @@ static int lxfb_blank(int blank_mode, struct fb_info *info)
}


static int __init lxfb_map_video_memory(struct fb_info *info,
static int __devinit lxfb_map_video_memory(struct fb_info *info,
struct pci_dev *dev)
{
struct lxfb_par *par = info->par;
Expand Down Expand Up @@ -412,7 +414,7 @@ static struct fb_ops lxfb_ops = {
.fb_imageblit = cfb_imageblit,
};

static struct fb_info * __init lxfb_init_fbinfo(struct device *dev)
static struct fb_info * __devinit lxfb_init_fbinfo(struct device *dev)
{
struct lxfb_par *par;
struct fb_info *info;
Expand Down Expand Up @@ -496,7 +498,7 @@ static int lxfb_resume(struct pci_dev *pdev)
#define lxfb_resume NULL
#endif

static int __init lxfb_probe(struct pci_dev *pdev,
static int __devinit lxfb_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
struct lxfb_par *par;
Expand Down Expand Up @@ -588,7 +590,7 @@ static int __init lxfb_probe(struct pci_dev *pdev,
return ret;
}

static void lxfb_remove(struct pci_dev *pdev)
static void __devexit lxfb_remove(struct pci_dev *pdev)
{
struct fb_info *info = pci_get_drvdata(pdev);
struct lxfb_par *par = info->par;
Expand Down

0 comments on commit 12c46b3

Please sign in to comment.