fbdev/cirrusfb: Rewrite Zorro graphics card probing
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 20 Oct 2011 11:42:23 +0000 (13:42 +0200)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Fri, 11 Nov 2011 16:55:55 +0000 (16:55 +0000)
commit0e0d13364b417a40266999c61671db0ef8690ad3
tree51924743f301a186b4ac9e46eb0bc99b42a7413e
parent38eb6863ed21de9beab792f66cd282c21e0dc10b
fbdev/cirrusfb: Rewrite Zorro graphics card probing

As indicated by commit a7f4d00a82feb5b311f765bf9522bc55bee0684f ("zorro:
Defer device_register() until all devices have been identified"), cirrusfb
crashes if zorro_find_device() cannot find an expected device.

Rewrite the Zorro device probe code to make it more robust, easier to
understand, and more extensible.

Other logical changes:
  - For cards that show up as 2 Zorro devices, autoprobe graphics memory
    sizes based on the size of the Zorro device containing the graphics
    memory.
    Acording to the NetBSD sources, this is safe.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/cirrusfb.c