Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+60 −66
Original line number Diff line number Diff line
@@ -652,7 +652,8 @@ sti_search_font(struct sti_cooked_rom *rom, int height, int width)
	int i = 0;
	
	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 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)
{
	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;