X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fvideo%2Fskeletonfb.c;h=64779e70408f9e8a0d25c0973a5f39558b70471d;hb=ac1ae162c9c400d63e62d9f2878be968b10ceaab;hp=9fda5b5d64dde853c60852da4386001652b91503;hpb=36cc535b852bd59d04c43fe8e4c05c7da46bc625;p=linux-2.6 diff --git a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c index 9fda5b5d64..64779e7040 100644 --- a/drivers/video/skeletonfb.c +++ b/drivers/video/skeletonfb.c @@ -14,7 +14,7 @@ * of it. * * First the roles of struct fb_info and struct display have changed. Struct - * display will go away. The way the the new framebuffer console code will + * display will go away. The way the new framebuffer console code will * work is that it will act to translate data about the tty/console in * struct vc_data to data in a device independent way in struct fb_info. Then * various functions in struct fb_ops will be called to store the device @@ -84,7 +84,7 @@ struct xxx_par; * if we don't use modedb. If we do use modedb see xxxfb_init how to use it * to get a fb_var_screeninfo. Otherwise define a default var as well. */ -static struct fb_fix_screeninfo xxxfb_fix __initdata = { +static struct fb_fix_screeninfo xxxfb_fix __devinitdata = { .id = "FB's name", .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_PSEUDOCOLOR, @@ -132,7 +132,6 @@ static struct fb_info info; static struct xxx_par __initdata current_par; int xxxfb_init(void); -int xxxfb_setup(char*); /** * xxxfb_open - Optional function. Called when the framebuffer is @@ -148,7 +147,7 @@ int xxxfb_setup(char*); * * Returns negative errno on error, or zero on success. */ -static int xxxfb_open(const struct fb_info *info, int user) +static int xxxfb_open(struct fb_info *info, int user) { return 0; } @@ -167,7 +166,7 @@ static int xxxfb_open(const struct fb_info *info, int user) * * Returns negative errno on error, or zero on success. */ -static int xxxfb_release(const struct fb_info *info, int user) +static int xxxfb_release(struct fb_info *info, int user) { return 0; } @@ -628,19 +627,6 @@ void xxxfb_rotate(struct fb_info *info, int angle) /* Will be deprecated */ } -/** - * xxxfb_poll - NOT a required function. The purpose of this - * function is to provide a way for some process - * to wait until a specific hardware event occurs - * for the framebuffer device. - * - * @info: frame buffer structure that represents a single frame buffer - * @wait: poll table where we store process that await a event. - */ -void xxxfb_poll(struct fb_info *info, poll_table *wait) -{ -} - /** * xxxfb_sync - NOT a required function. Normally the accel engine * for a graphics card take a specific amount of time. @@ -678,7 +664,6 @@ static struct fb_ops xxxfb_ops = { .fb_imageblit = xxxfb_imageblit, /* Needed !!! */ .fb_cursor = xxxfb_cursor, /* Optional !!! */ .fb_rotate = xxxfb_rotate, - .fb_poll = xxxfb_poll, .fb_sync = xxxfb_sync, .fb_ioctl = xxxfb_ioctl, .fb_mmap = xxxfb_mmap, @@ -692,7 +677,7 @@ static struct fb_ops xxxfb_ops = { /* static int __init xxfb_probe (struct device *device) -- for platform devs */ static int __devinit xxxfb_probe(struct pci_dev *dev, - const_struct pci_device_id *ent) + const struct pci_device_id *ent) { struct fb_info *info; struct xxx_par *par; @@ -719,7 +704,7 @@ static int __devinit xxxfb_probe(struct pci_dev *dev, info->screen_base = framebuffer_virtual_memory; info->fbops = &xxxfb_ops; info->fix = xxxfb_fix; /* this will be the only time xxxfb_fix will be - * used, so mark it as __initdata + * used, so mark it as __devinitdata */ info->pseudo_palette = pseudo_palette; /* The pseudopalette is an * 16-member array @@ -858,8 +843,6 @@ static void __devexit xxxfb_remove(struct pci_dev *dev) /* ... */ framebuffer_release(info); } - - return 0; } #ifdef CONFIG_PCI @@ -902,7 +885,7 @@ static int xxxfb_resume(struct pci_dev *dev) static struct pci_device_id xxxfb_id_table[] = { { PCI_VENDOR_ID_XXX, PCI_DEVICE_ID_XXX, PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, - ADDR, 0 }, + PCI_CLASS_MASK, 0 }, { 0, } }; @@ -916,6 +899,8 @@ static struct pci_driver xxxfb_driver = { .resume = xxxfb_resume, /* optional but recommended */ }; +MODULE_DEVICE_TABLE(pci, xxxfb_id_table); + int __init xxxfb_init(void) { /* @@ -959,11 +944,11 @@ static int xxxfb_suspend(struct platform_device *dev, pm_message_t msg) /** * xxxfb_resume - Optional but recommended function. Resume the device. - * @dev: PCI device + * @dev: platform device * * See Documentation/power/devices.txt for more information */ -static int xxxfb_suspend(struct platform_dev *dev) +static int xxxfb_resume(struct platform_dev *dev) { struct fb_info *info = platform_get_drvdata(dev); struct xxxfb_par *par = info->par; @@ -989,6 +974,21 @@ static struct platform_device xxxfb_device = { .name = "xxxfb", }; +#ifndef MODULE + /* + * Setup + */ + +/* + * Only necessary if your driver takes special options, + * otherwise we fall back on the generic fb_setup(). + */ +int __init xxxfb_setup(char *options) +{ + /* Parse user speficied options (`video=xxxfb:') */ +} +#endif /* MODULE */ + static int __init xxxfb_init(void) { int ret; @@ -1020,21 +1020,6 @@ static void __exit xxxfb_exit(void) } #endif /* CONFIG_PCI */ -#ifdef MODULE - /* - * Setup - */ - -/* - * Only necessary if your driver takes special options, - * otherwise we fall back on the generic fb_setup(). - */ -int __init xxxfb_setup(char *options) -{ - /* Parse user speficied options (`video=xxxfb:') */ -} -#endif /* MODULE *? - /* ------------------------------------------------------------------------- */