Commit 951a0150 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Kyle McMartin

[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: default avatarMatthew Wilcox <willy@parisc-linux.org>
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent 14e256c1
......@@ -651,8 +651,9 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width)
struct sti_cooked_font *font;
int i = 0;
for(font = rom->font_start; font; font = font->next_font, i++) {
if((font->raw->width == width) && (font->raw->height == height))
for (font = rom->font_start; font; font = font->next_font, i++) {
if ((font->raw->width == width) &&
(font->raw->height == height))
return i;
}
return 0;
......@@ -741,7 +742,7 @@ sti_get_wmode_rom (unsigned long address)
size = gsc_readl(address + offsetof(struct sti_rom,last_addr));
raw = kmalloc(size, GFP_KERNEL);
if(raw)
if (raw)
sti_rom_copy(address, size, raw);
return raw;
......@@ -932,28 +933,21 @@ static void __init sticore_check_for_default_sti(struct sti_struct *sti, char *p
*/
static int __init sticore_pa_init(struct parisc_device *dev)
{
unsigned long rom = 0;
char pa_path[21];
struct sti_struct *sti = NULL;
int hpa = dev->hpa.start;
if(dev->num_addrs) {
rom = dev->addr[0];
}
if (!rom) {
rom = dev->hpa;
DPRINTK((KERN_DEBUG "Trying STI ROM at %08lx, hpa at %08lx\n", rom, dev->hpa));
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 (dev->num_addrs && dev->addr[0])
sti = sti_try_rom_generic(dev->addr[0], hpa, NULL);
if (!sti)
sti = sti_try_rom_generic(hpa, hpa, NULL);
if (!sti)
sti = sti_try_rom_generic(PAGE0->proc_sti, hpa, NULL);
if (!sti)
return 1;
print_pa_hwpath(dev, pa_path);
sticore_check_for_default_sti (sti, pa_path);
sticore_check_for_default_sti(sti, pa_path);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment