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

Commit 144e988d authored by Sam Ravnborg's avatar Sam Ravnborg Committed by David S. Miller
Browse files

sparc32: code cleanup in floppy glue



Small cleanup to improve readability.
Dropped one test for sparc_cpu_model -
we already know that only sun4m support floppy.

Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 918f8322
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -288,10 +288,11 @@ static int sun_floppy_init(void)
{
	struct platform_device *op;
	struct device_node *dp;
	struct resource r;
	char state[128];
	phandle tnode, fd_node;
	phandle fd_node;
	phandle tnode;
	int num_regs;
	struct resource r;

	use_virtual_dma = 1;

@@ -316,8 +317,7 @@ static int sun_floppy_init(void)
	}

	/* The sun4m lets us know if the controller is actually usable. */
	if(sparc_cpu_model == sun4m &&
	   prom_getproperty(fd_node, "status", state, sizeof(state)) != -1) {
	if (prom_getproperty(fd_node, "status", state, sizeof(state)) != -1) {
		if(!strcmp(state, "disabled")) {
			goto no_sun_fdc;
		}
@@ -328,8 +328,7 @@ static int sun_floppy_init(void)
	memset(&r, 0, sizeof(r));
	r.flags = fd_regs[0].which_io;
	r.start = fd_regs[0].phys_addr;
	sun_fdc = (struct sun_flpy_controller *)
	    of_ioremap(&r, 0, fd_regs[0].reg_size, "floppy");
	sun_fdc = of_ioremap(&r, 0, fd_regs[0].reg_size, "floppy");

	/* Look up irq in platform_device.
	 * We try "SUNW,fdtwo" and "fd"