mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
nubus: Adopt standard linked list implementation
This increases code re-use and improves readability. Cc: "David S. Miller" <[email protected]> Cc: Bartlomiej Zolnierkiewicz <[email protected]> Acked-by: Bartlomiej Zolnierkiewicz <[email protected]> Tested-by: Stan Johnson <[email protected]> Signed-off-by: Finn Thain <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]>
This commit is contained in:
parent
189e19e8cb
commit
41b848160e
7 changed files with 40 additions and 60 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue