diff options
Diffstat (limited to 'drivers/video/fbdev/macfb.c')
-rw-r--r-- | drivers/video/fbdev/macfb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/fbdev/macfb.c b/drivers/video/fbdev/macfb.c index e86a2796e3d9..e707e617bf1c 100644 --- a/drivers/video/fbdev/macfb.c +++ b/drivers/video/fbdev/macfb.c @@ -670,15 +670,17 @@ static int __init macfb_init(void) * code is really broken :-) */ - while ((ndev = nubus_find_type(NUBUS_CAT_DISPLAY, - NUBUS_TYPE_VIDEO, ndev))) - { + for_each_func_rsrc(ndev) { unsigned long base = ndev->board->slot_addr; if (mac_bi_data.videoaddr < base || mac_bi_data.videoaddr - base > 0xFFFFFF) continue; + if (ndev->category != NUBUS_CAT_DISPLAY || + ndev->type != NUBUS_TYPE_VIDEO) + continue; + video_is_nubus = 1; slot_addr = (unsigned char *)base; |