aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/s3fb.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-04-28 05:15:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:38 -0400
commit20e061fb750d36ec0ffcb2e44ed7dafa9018223b (patch)
tree2b3a55f91500ae0a1826a5ee9ac10f58e50b4049 /drivers/video/s3fb.c
parent8f5af9de9cf3cbf51c5758a1d5ea266aea6fe175 (diff)
fbdev: framebuffer_alloc() fixes
Correct the dev arg of framebuffer_alloc() in arkfb, s3fb and vt8623fb. Signed-off-by: Ondrej Zajicek <santiago@crfreenet.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/s3fb.c')
-rw-r--r--drivers/video/s3fb.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index 649cdd213d0f..2972f112dbed 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -888,7 +888,7 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
888 } 888 }
889 889
890 /* Allocate and fill driver data structure */ 890 /* Allocate and fill driver data structure */
891 info = framebuffer_alloc(sizeof(struct s3fb_info), NULL); 891 info = framebuffer_alloc(sizeof(struct s3fb_info), &(dev->dev));
892 if (!info) { 892 if (!info) {
893 dev_err(&(dev->dev), "cannot allocate memory\n"); 893 dev_err(&(dev->dev), "cannot allocate memory\n");
894 return -ENOMEM; 894 return -ENOMEM;
@@ -903,13 +903,13 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
903 /* Prepare PCI device */ 903 /* Prepare PCI device */
904 rc = pci_enable_device(dev); 904 rc = pci_enable_device(dev);
905 if (rc < 0) { 905 if (rc < 0) {
906 dev_err(&(dev->dev), "cannot enable PCI device\n"); 906 dev_err(info->dev, "cannot enable PCI device\n");
907 goto err_enable_device; 907 goto err_enable_device;
908 } 908 }
909 909
910 rc = pci_request_regions(dev, "s3fb"); 910 rc = pci_request_regions(dev, "s3fb");
911 if (rc < 0) { 911 if (rc < 0) {
912 dev_err(&(dev->dev), "cannot reserve framebuffer region\n"); 912 dev_err(info->dev, "cannot reserve framebuffer region\n");
913 goto err_request_regions; 913 goto err_request_regions;
914 } 914 }
915 915
@@ -921,7 +921,7 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
921 info->screen_base = pci_iomap(dev, 0, 0); 921 info->screen_base = pci_iomap(dev, 0, 0);
922 if (! info->screen_base) { 922 if (! info->screen_base) {
923 rc = -ENOMEM; 923 rc = -ENOMEM;
924 dev_err(&(dev->dev), "iomap for framebuffer failed\n"); 924 dev_err(info->dev, "iomap for framebuffer failed\n");
925 goto err_iomap; 925 goto err_iomap;
926 } 926 }
927 927
@@ -965,19 +965,19 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
965 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); 965 rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8);
966 if (! ((rc == 1) || (rc == 2))) { 966 if (! ((rc == 1) || (rc == 2))) {
967 rc = -EINVAL; 967 rc = -EINVAL;
968 dev_err(&(dev->dev), "mode %s not found\n", mode_option); 968 dev_err(info->dev, "mode %s not found\n", mode_option);
969 goto err_find_mode; 969 goto err_find_mode;
970 } 970 }
971 971
972 rc = fb_alloc_cmap(&info->cmap, 256, 0); 972 rc = fb_alloc_cmap(&info->cmap, 256, 0);
973 if (rc < 0) { 973 if (rc < 0) {
974 dev_err(&(dev->dev), "cannot allocate colormap\n"); 974 dev_err(info->dev, "cannot allocate colormap\n");
975 goto err_alloc_cmap; 975 goto err_alloc_cmap;
976 } 976 }
977 977
978 rc = register_framebuffer(info); 978 rc = register_framebuffer(info);
979 if (rc < 0) { 979 if (rc < 0) {
980 dev_err(&(dev->dev), "cannot register framebuffer\n"); 980 dev_err(info->dev, "cannot register framebuffer\n");
981 goto err_reg_fb; 981 goto err_reg_fb;
982 } 982 }
983 983
@@ -1053,7 +1053,7 @@ static int s3_pci_suspend(struct pci_dev* dev, pm_message_t state)
1053 struct fb_info *info = pci_get_drvdata(dev); 1053 struct fb_info *info = pci_get_drvdata(dev);
1054 struct s3fb_info *par = info->par; 1054 struct s3fb_info *par = info->par;
1055 1055
1056 dev_info(&(dev->dev), "suspend\n"); 1056 dev_info(info->dev, "suspend\n");
1057 1057
1058 acquire_console_sem(); 1058 acquire_console_sem();
1059 mutex_lock(&(par->open_lock)); 1059 mutex_lock(&(par->open_lock));
@@ -1085,7 +1085,7 @@ static int s3_pci_resume(struct pci_dev* dev)
1085 struct s3fb_info *par = info->par; 1085 struct s3fb_info *par = info->par;
1086 int err; 1086 int err;
1087 1087
1088 dev_info(&(dev->dev), "resume\n"); 1088 dev_info(info->dev, "resume\n");
1089 1089
1090 acquire_console_sem(); 1090 acquire_console_sem();
1091 mutex_lock(&(par->open_lock)); 1091 mutex_lock(&(par->open_lock));
@@ -1102,7 +1102,7 @@ static int s3_pci_resume(struct pci_dev* dev)
1102 if (err) { 1102 if (err) {
1103 mutex_unlock(&(par->open_lock)); 1103 mutex_unlock(&(par->open_lock));
1104 release_console_sem(); 1104 release_console_sem();
1105 dev_err(&(dev->dev), "error %d enabling device for resume\n", err); 1105 dev_err(info->dev, "error %d enabling device for resume\n", err);
1106 return err; 1106 return err;
1107 } 1107 }
1108 pci_set_master(dev); 1108 pci_set_master(dev);