[PARISC] Reorganize sticore probe routine to be a little less convoluted
Fix some whitespace issues Reorganise parisc_device probe routine to be a little less convoluted Use ->hpa.start instead of ->hpa Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
This commit is contained in:
committed by
Kyle McMartin
parent
14e256c107
commit
951a015013
@@ -652,7 +652,8 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (font = rom->font_start; font; font = font->next_font, i++) {
|
for (font = rom->font_start; font; font = font->next_font, i++) {
|
||||||
if((font->raw->width == width) && (font->raw->height == height))
|
if ((font->raw->width == width) &&
|
||||||
|
(font->raw->height == height))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -932,23 +933,16 @@ static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *p
|
|||||||
*/
|
*/
|
||||||
static int __init sticore_pa_init(struct parisc_device *dev)
|
static int __init sticore_pa_init(struct parisc_device *dev)
|
||||||
{
|
{
|
||||||
unsigned long rom = 0;
|
|
||||||
char pa_path[21];
|
char pa_path[21];
|
||||||
struct sti_struct *sti = NULL;
|
struct sti_struct *sti = NULL;
|
||||||
|
int hpa = dev->hpa.start;
|
||||||
|
|
||||||
if(dev->num_addrs) {
|
if (dev->num_addrs && dev->addr[0])
|
||||||
rom = dev->addr[0];
|
sti = sti_try_rom_generic(dev->addr[0], hpa, NULL);
|
||||||
}
|
if (!sti)
|
||||||
if (!rom) {
|
sti = sti_try_rom_generic(hpa, hpa, NULL);
|
||||||
rom = dev->hpa;
|
if (!sti)
|
||||||
DPRINTK((KERN_DEBUG "Trying STI ROM at %08lx, hpa at %08lx\n", rom, dev->hpa));
|
sti = sti_try_rom_generic(PAGE0->proc_sti, hpa, NULL);
|
||||||
sti = sti_try_rom_generic(rom, dev->hpa, NULL);
|
|
||||||
rom = PAGE0->proc_sti;
|
|
||||||
}
|
|
||||||
if (!sti) {
|
|
||||||
DPRINTK((KERN_DEBUG "Trying STI ROM at %08lx, hpa at %08lx\n", rom, dev->hpa));
|
|
||||||
sti = sti_try_rom_generic(rom, dev->hpa, NULL);
|
|
||||||
}
|
|
||||||
if (!sti)
|
if (!sti)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user