diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2008-04-28 05:15:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:38 -0400 |
commit | 20e061fb750d36ec0ffcb2e44ed7dafa9018223b (patch) | |
tree | 2b3a55f91500ae0a1826a5ee9ac10f58e50b4049 /drivers/video/vt8623fb.c | |
parent | 8f5af9de9cf3cbf51c5758a1d5ea266aea6fe175 (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/vt8623fb.c')
-rw-r--r-- | drivers/video/vt8623fb.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c index 0b9dd22f3ee6..536ab11623f0 100644 --- a/drivers/video/vt8623fb.c +++ b/drivers/video/vt8623fb.c | |||
@@ -661,7 +661,7 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi | |||
661 | } | 661 | } |
662 | 662 | ||
663 | /* Allocate and fill driver data structure */ | 663 | /* Allocate and fill driver data structure */ |
664 | info = framebuffer_alloc(sizeof(struct vt8623fb_info), NULL); | 664 | info = framebuffer_alloc(sizeof(struct vt8623fb_info), &(dev->dev)); |
665 | if (! info) { | 665 | if (! info) { |
666 | dev_err(&(dev->dev), "cannot allocate memory\n"); | 666 | dev_err(&(dev->dev), "cannot allocate memory\n"); |
667 | return -ENOMEM; | 667 | return -ENOMEM; |
@@ -677,13 +677,13 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi | |||
677 | 677 | ||
678 | rc = pci_enable_device(dev); | 678 | rc = pci_enable_device(dev); |
679 | if (rc < 0) { | 679 | if (rc < 0) { |
680 | dev_err(&(dev->dev), "cannot enable PCI device\n"); | 680 | dev_err(info->dev, "cannot enable PCI device\n"); |
681 | goto err_enable_device; | 681 | goto err_enable_device; |
682 | } | 682 | } |
683 | 683 | ||
684 | rc = pci_request_regions(dev, "vt8623fb"); | 684 | rc = pci_request_regions(dev, "vt8623fb"); |
685 | if (rc < 0) { | 685 | if (rc < 0) { |
686 | dev_err(&(dev->dev), "cannot reserve framebuffer region\n"); | 686 | dev_err(info->dev, "cannot reserve framebuffer region\n"); |
687 | goto err_request_regions; | 687 | goto err_request_regions; |
688 | } | 688 | } |
689 | 689 | ||
@@ -696,14 +696,14 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi | |||
696 | info->screen_base = pci_iomap(dev, 0, 0); | 696 | info->screen_base = pci_iomap(dev, 0, 0); |
697 | if (! info->screen_base) { | 697 | if (! info->screen_base) { |
698 | rc = -ENOMEM; | 698 | rc = -ENOMEM; |
699 | dev_err(&(dev->dev), "iomap for framebuffer failed\n"); | 699 | dev_err(info->dev, "iomap for framebuffer failed\n"); |
700 | goto err_iomap_1; | 700 | goto err_iomap_1; |
701 | } | 701 | } |
702 | 702 | ||
703 | par->mmio_base = pci_iomap(dev, 1, 0); | 703 | par->mmio_base = pci_iomap(dev, 1, 0); |
704 | if (! par->mmio_base) { | 704 | if (! par->mmio_base) { |
705 | rc = -ENOMEM; | 705 | rc = -ENOMEM; |
706 | dev_err(&(dev->dev), "iomap for MMIO failed\n"); | 706 | dev_err(info->dev, "iomap for MMIO failed\n"); |
707 | goto err_iomap_2; | 707 | goto err_iomap_2; |
708 | } | 708 | } |
709 | 709 | ||
@@ -714,7 +714,7 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi | |||
714 | if ((16 <= memsize1) && (memsize1 <= 64) && (memsize1 == memsize2)) | 714 | if ((16 <= memsize1) && (memsize1 <= 64) && (memsize1 == memsize2)) |
715 | info->screen_size = memsize1 << 20; | 715 | info->screen_size = memsize1 << 20; |
716 | else { | 716 | else { |
717 | dev_err(&(dev->dev), "memory size detection failed (%x %x), suppose 16 MB\n", memsize1, memsize2); | 717 | dev_err(info->dev, "memory size detection failed (%x %x), suppose 16 MB\n", memsize1, memsize2); |
718 | info->screen_size = 16 << 20; | 718 | info->screen_size = 16 << 20; |
719 | } | 719 | } |
720 | 720 | ||
@@ -731,19 +731,19 @@ static int __devinit vt8623_pci_probe(struct pci_dev *dev, const struct pci_devi | |||
731 | rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); | 731 | rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); |
732 | if (! ((rc == 1) || (rc == 2))) { | 732 | if (! ((rc == 1) || (rc == 2))) { |
733 | rc = -EINVAL; | 733 | rc = -EINVAL; |
734 | dev_err(&(dev->dev), "mode %s not found\n", mode_option); | 734 | dev_err(info->dev, "mode %s not found\n", mode_option); |
735 | goto err_find_mode; | 735 | goto err_find_mode; |
736 | } | 736 | } |
737 | 737 | ||
738 | rc = fb_alloc_cmap(&info->cmap, 256, 0); | 738 | rc = fb_alloc_cmap(&info->cmap, 256, 0); |
739 | if (rc < 0) { | 739 | if (rc < 0) { |
740 | dev_err(&(dev->dev), "cannot allocate colormap\n"); | 740 | dev_err(info->dev, "cannot allocate colormap\n"); |
741 | goto err_alloc_cmap; | 741 | goto err_alloc_cmap; |
742 | } | 742 | } |
743 | 743 | ||
744 | rc = register_framebuffer(info); | 744 | rc = register_framebuffer(info); |
745 | if (rc < 0) { | 745 | if (rc < 0) { |
746 | dev_err(&(dev->dev), "cannot register framebugger\n"); | 746 | dev_err(info->dev, "cannot register framebugger\n"); |
747 | goto err_reg_fb; | 747 | goto err_reg_fb; |
748 | } | 748 | } |
749 | 749 | ||
@@ -817,7 +817,7 @@ static int vt8623_pci_suspend(struct pci_dev* dev, pm_message_t state) | |||
817 | struct fb_info *info = pci_get_drvdata(dev); | 817 | struct fb_info *info = pci_get_drvdata(dev); |
818 | struct vt8623fb_info *par = info->par; | 818 | struct vt8623fb_info *par = info->par; |
819 | 819 | ||
820 | dev_info(&(dev->dev), "suspend\n"); | 820 | dev_info(info->dev, "suspend\n"); |
821 | 821 | ||
822 | acquire_console_sem(); | 822 | acquire_console_sem(); |
823 | mutex_lock(&(par->open_lock)); | 823 | mutex_lock(&(par->open_lock)); |
@@ -848,7 +848,7 @@ static int vt8623_pci_resume(struct pci_dev* dev) | |||
848 | struct fb_info *info = pci_get_drvdata(dev); | 848 | struct fb_info *info = pci_get_drvdata(dev); |
849 | struct vt8623fb_info *par = info->par; | 849 | struct vt8623fb_info *par = info->par; |
850 | 850 | ||
851 | dev_info(&(dev->dev), "resume\n"); | 851 | dev_info(info->dev, "resume\n"); |
852 | 852 | ||
853 | acquire_console_sem(); | 853 | acquire_console_sem(); |
854 | mutex_lock(&(par->open_lock)); | 854 | mutex_lock(&(par->open_lock)); |