diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-14 10:30:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-01 17:52:00 -0500 |
commit | 78cde0887930f5d11a56fc51b013f2672fba0e6f (patch) | |
tree | c91d1295dc7385a62f32414f50303e0608d6d1db /drivers/video/fbmem.c | |
parent | e55c8790d40fdbc6887b4e3e52afefe4b03f1311 (diff) |
Driver core: convert fb code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r-- | drivers/video/fbmem.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 93ffcdd95f50..e973a87fbb01 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -1296,14 +1296,14 @@ register_framebuffer(struct fb_info *fb_info) | |||
1296 | break; | 1296 | break; |
1297 | fb_info->node = i; | 1297 | fb_info->node = i; |
1298 | 1298 | ||
1299 | fb_info->class_device = class_device_create(fb_class, NULL, MKDEV(FB_MAJOR, i), | 1299 | fb_info->dev = device_create(fb_class, fb_info->device, |
1300 | fb_info->device, "fb%d", i); | 1300 | MKDEV(FB_MAJOR, i), "fb%d", i); |
1301 | if (IS_ERR(fb_info->class_device)) { | 1301 | if (IS_ERR(fb_info->dev)) { |
1302 | /* Not fatal */ | 1302 | /* Not fatal */ |
1303 | printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->class_device)); | 1303 | printk(KERN_WARNING "Unable to create device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->dev)); |
1304 | fb_info->class_device = NULL; | 1304 | fb_info->dev = NULL; |
1305 | } else | 1305 | } else |
1306 | fb_init_class_device(fb_info); | 1306 | fb_init_device(fb_info); |
1307 | 1307 | ||
1308 | if (fb_info->pixmap.addr == NULL) { | 1308 | if (fb_info->pixmap.addr == NULL) { |
1309 | fb_info->pixmap.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); | 1309 | fb_info->pixmap.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); |
@@ -1356,8 +1356,8 @@ unregister_framebuffer(struct fb_info *fb_info) | |||
1356 | fb_destroy_modelist(&fb_info->modelist); | 1356 | fb_destroy_modelist(&fb_info->modelist); |
1357 | registered_fb[i]=NULL; | 1357 | registered_fb[i]=NULL; |
1358 | num_registered_fb--; | 1358 | num_registered_fb--; |
1359 | fb_cleanup_class_device(fb_info); | 1359 | fb_cleanup_device(fb_info); |
1360 | class_device_destroy(fb_class, MKDEV(FB_MAJOR, i)); | 1360 | device_destroy(fb_class, MKDEV(FB_MAJOR, i)); |
1361 | event.info = fb_info; | 1361 | event.info = fb_info; |
1362 | fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event); | 1362 | fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event); |
1363 | return 0; | 1363 | return 0; |