From db8df7b0622cc6ddad993da2e4dfaf3b5d98ee30 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 22 Sep 2009 16:47:38 -0700 Subject: [PATCH] viafb: pass reference to pci device when calling framebuffer_alloc() Signed-off-by: Harald Welte Signed-off-by: Florian Tobias Schandinat Cc: Scott Fang Cc: Joseph Chan Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/video/via/viafbdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index c661ab62c057..56ec696e8afa 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c @@ -1857,7 +1857,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; @@ -1982,7 +1983,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"); -- 2.30.2