提交 db8df7b0 编写于 作者: H Harald Welte 提交者: Linus Torvalds

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

Signed-off-by: NHarald Welte <HaraldWelte@viatech.com>
Signed-off-by: NFlorian 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 2d280f75
...@@ -1857,7 +1857,8 @@ static int __devinit via_pci_probe(struct pci_dev *pdev, ...@@ -1857,7 +1857,8 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
* variables * variables
*/ */
viafbinfo = framebuffer_alloc(viafb_par_length + 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) { if (!viafbinfo) {
printk(KERN_ERR"Could not allocate memory for viafb_info.\n"); printk(KERN_ERR"Could not allocate memory for viafb_info.\n");
return -ENODEV; return -ENODEV;
...@@ -1982,7 +1983,7 @@ static int __devinit via_pci_probe(struct pci_dev *pdev, ...@@ -1982,7 +1983,7 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
default_var.vsync_len = 4; default_var.vsync_len = 4;
if (viafb_dual_fb) { if (viafb_dual_fb) {
viafbinfo1 = framebuffer_alloc(viafb_par_length, NULL); viafbinfo1 = framebuffer_alloc(viafb_par_length, &pdev->dev);
if (!viafbinfo1) { if (!viafbinfo1) {
printk(KERN_ERR printk(KERN_ERR
"allocate the second framebuffer struct error\n"); "allocate the second framebuffer struct error\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册