Skip to content

Commit

Permalink
viafb: pass reference to pci device when calling framebuffer_alloc()
Browse files Browse the repository at this point in the history
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Harald Welte authored and Linus Torvalds committed Sep 23, 2009
1 parent 2d280f7 commit db8df7b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/video/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit db8df7b

Please sign in to comment.