• Sam Ravnborg's avatar
    hpt366: fix section mismatch warnings · b66cae76
    Sam Ravnborg authored
    hpt366: fix section mismatch warnings
    
    Fix following warnings:
    WARNING: o-sparc64/vmlinux.o(.data+0x195a38): Section mismatch in reference from the variable hpt37x_info.0 to the variable .devinit.data:hpt370
    WARNING: o-sparc64/vmlinux.o(.data+0x195a40): Section mismatch in reference from the variable hpt37x_info.0 to the variable .devinit.data:hpt370a
    WARNING: o-sparc64/vmlinux.o(.data+0x195a48): Section mismatch in reference from the variable hpt37x_info.0 to the variable .devinit.data:hpt372
    WARNING: o-sparc64/vmlinux.o(.data+0x195a50): Section mismatch in reference from the variable hpt37x_info.0 to the variable .devinit.data:hpt372n
    
    Replace a static array with a small switch resulting in
    more readable code.
    Mark the pci table __devinitconst.
    
    A lot of variables are const but annotated __devinitdata.
    Annotating them __devinitconst would cause a section type
    conflict error when build for 64 bit powerpc.
    Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
    Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    b66cae76
hpt366.c 44.6 KB