[PATCH 4/4] viafb: pass reference to pci device when calling framebuffer_alloc()

From: Florian Tobias Schandinat
Date: Mon Sep 14 2009 - 06:27:30 EST


From: Harald Welte <laforge@xxxxxxxxxxxx>

viafb: pass reference to pci device when calling framebuffer_alloc()

Signed-off-by: Harald Welte <HaraldWelte@xxxxxxxxxxx>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@xxxxxx>
---
drivers/video/via/viafbdev.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 463d92a..48e663b 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -1816,7 +1816,8 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
* variables
*/
viafbinfo = framebuffer_alloc(viafb_par_length +
- ALIGN(sizeof(struct viafb_shared), BITS_PER_LONG/8), NULL);
+ ALIGN(sizeof(struct viafb_shared), BITS_PER_LONG/8),
+ &pdev->dev);
if (!viafbinfo) {
printk(KERN_ERR"Could not allocate memory for viafb_info.\n");
return -ENODEV;
@@ -1941,7 +1942,7 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
default_var.vsync_len = 4;

if (viafb_dual_fb) {
- viafbinfo1 = framebuffer_alloc(viafb_par_length, NULL);
+ viafbinfo1 = framebuffer_alloc(viafb_par_length, &pdev->dev);
if (!viafbinfo1) {
printk(KERN_ERR
"allocate the second framebuffer struct error\n");
--
1.6.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/