diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 03:37:15 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-01-30 03:37:15 +0300 |
commit | aca21de2e8355769513c27d1c218e3e8947fe84b (patch) | |
tree | 1a79f8baa76c9828c36c3331628eb4f10be7b214 /drivers/video | |
parent | 31466f3ed710e5761077190809e694f55aed5deb (diff) | |
parent | 2334b1ac1235934fc196f2d25bae7f348d3bf42e (diff) | |
download | linux-aca21de2e8355769513c27d1c218e3e8947fe84b.tar.xz |
Merge tag 'm68k-for-v4.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven:
- first part of an overhaul of the NuBus subsystem, to bring it up to
modern driver model standards
- a race condition fix for Mac
- defconfig updates
* tag 'm68k-for-v4.16-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
MAINTAINERS: Add NuBus subsystem entry
m68k/mac: Fix race conditions in OSS interrupt dispatch
nubus: Add support for the driver model
nubus: Add expansion_type values for various Mac models
nubus: Adopt standard linked list implementation
nubus: Rename struct nubus_dev
nubus: Rework /proc/bus/nubus/s/ implementation
nubus: Generalize block resource handling
nubus: Clean up whitespace
nubus: Remove redundant code
nubus: Call proc_mkdir() not more than once per slot directory
nubus: Validate slot resource IDs
nubus: Fix log spam
nubus: Use static functions where possible
nubus: Fix up header split
nubus: Avoid array underflow and overflow
m68k/defconfig: Update defconfigs for v4.15-rc1
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/macfb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/fbdev/macfb.c b/drivers/video/fbdev/macfb.c index cda7587cbc86..e707e617bf1c 100644 --- a/drivers/video/fbdev/macfb.c +++ b/drivers/video/fbdev/macfb.c @@ -556,7 +556,7 @@ static void __init iounmap_macfb(void) static int __init macfb_init(void) { int video_cmap_len, video_is_nubus = 0; - struct nubus_dev* ndev = NULL; + struct nubus_rsrc *ndev = NULL; char *option = NULL; int err; @@ -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; |