diff options
author | Tejun Heo <tj@kernel.org> | 2010-04-04 22:37:28 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-04-04 22:37:28 -0400 |
commit | 336f5899d287f06d8329e208fc14ce50f7ec9698 (patch) | |
tree | 9b762d450d5eb248a6ff8317badb7e223d93ed58 /drivers/video | |
parent | a4ab2773205e8b94c18625455f85e3b6bb9d7ad6 (diff) | |
parent | db217dece3003df0841bacf9556b5c06aa097dae (diff) |
Merge branch 'master' into export-slabh
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/sunxvr500.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/video/sunxvr500.c b/drivers/video/sunxvr500.c index 03a03f302cb3..b9c2b948d34d 100644 --- a/drivers/video/sunxvr500.c +++ b/drivers/video/sunxvr500.c | |||
@@ -241,11 +241,27 @@ static int __devinit e3d_set_fbinfo(struct e3d_info *ep) | |||
241 | static int __devinit e3d_pci_register(struct pci_dev *pdev, | 241 | static int __devinit e3d_pci_register(struct pci_dev *pdev, |
242 | const struct pci_device_id *ent) | 242 | const struct pci_device_id *ent) |
243 | { | 243 | { |
244 | struct device_node *of_node; | ||
245 | const char *device_type; | ||
244 | struct fb_info *info; | 246 | struct fb_info *info; |
245 | struct e3d_info *ep; | 247 | struct e3d_info *ep; |
246 | unsigned int line_length; | 248 | unsigned int line_length; |
247 | int err; | 249 | int err; |
248 | 250 | ||
251 | of_node = pci_device_to_OF_node(pdev); | ||
252 | if (!of_node) { | ||
253 | printk(KERN_ERR "e3d: Cannot find OF node of %s\n", | ||
254 | pci_name(pdev)); | ||
255 | return -ENODEV; | ||
256 | } | ||
257 | |||
258 | device_type = of_get_property(of_node, "device_type", NULL); | ||
259 | if (!device_type) { | ||
260 | printk(KERN_INFO "e3d: Ignoring secondary output device " | ||
261 | "at %s\n", pci_name(pdev)); | ||
262 | return -ENODEV; | ||
263 | } | ||
264 | |||
249 | err = pci_enable_device(pdev); | 265 | err = pci_enable_device(pdev); |
250 | if (err < 0) { | 266 | if (err < 0) { |
251 | printk(KERN_ERR "e3d: Cannot enable PCI device %s\n", | 267 | printk(KERN_ERR "e3d: Cannot enable PCI device %s\n", |
@@ -264,13 +280,7 @@ static int __devinit e3d_pci_register(struct pci_dev *pdev, | |||
264 | ep->info = info; | 280 | ep->info = info; |
265 | ep->pdev = pdev; | 281 | ep->pdev = pdev; |
266 | spin_lock_init(&ep->lock); | 282 | spin_lock_init(&ep->lock); |
267 | ep->of_node = pci_device_to_OF_node(pdev); | 283 | ep->of_node = of_node; |
268 | if (!ep->of_node) { | ||
269 | printk(KERN_ERR "e3d: Cannot find OF node of %s\n", | ||
270 | pci_name(pdev)); | ||
271 | err = -ENODEV; | ||
272 | goto err_release_fb; | ||
273 | } | ||
274 | 284 | ||
275 | /* Read the PCI base register of the frame buffer, which we | 285 | /* Read the PCI base register of the frame buffer, which we |
276 | * need in order to interpret the RAMDAC_VID_*FB* values in | 286 | * need in order to interpret the RAMDAC_VID_*FB* values in |