Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30290
b: refs/heads/master
c: 20cecf6
h: refs/heads/master
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Jun 26, 2006
1 parent 682dc11 commit a4e0a99
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 103edf024b98ff6a1feef9c43886f39b00c5753d
refs/heads/master: 20cecf6a6ade62e3a721eb31540f22126df7462b
29 changes: 13 additions & 16 deletions trunk/drivers/video/vfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,6 @@ static int __init vfb_setup(char *options)
* Initialisation
*/

static void vfb_platform_release(struct device *device)
{
// This is called when the reference count goes to zero.
dev_err(device, "This driver is broken, please bug the authors so they will fix it.\n");
}

static int __init vfb_probe(struct platform_device *dev)
{
struct fb_info *info;
Expand Down Expand Up @@ -482,13 +476,7 @@ static struct platform_driver vfb_driver = {
},
};

static struct platform_device vfb_device = {
.name = "vfb",
.id = 0,
.dev = {
.release = vfb_platform_release,
}
};
static struct platform_device *vfb_device;

static int __init vfb_init(void)
{
Expand All @@ -508,10 +496,19 @@ static int __init vfb_init(void)
ret = platform_driver_register(&vfb_driver);

if (!ret) {
ret = platform_device_register(&vfb_device);
if (ret)
vfb_device = platform_device_alloc("vfb", 0);

if (vfb_device)
ret = platform_device_add(vfb_device);
else
ret = -ENOMEM;

if (ret) {
platform_device_put(vfb_device);
platform_driver_unregister(&vfb_driver);
}
}

return ret;
}

Expand All @@ -520,7 +517,7 @@ module_init(vfb_init);
#ifdef MODULE
static void __exit vfb_exit(void)
{
platform_device_unregister(&vfb_device);
platform_device_unregister(vfb_device);
platform_driver_unregister(&vfb_driver);
}

Expand Down

0 comments on commit a4e0a99

Please sign in to comment.