superio/smsc/sio1036: Clean up RAMstage superio.c component
Remove spurious includes, unused variables and some wasted new lines. Re-organise things to be consistent with other superio's. Change-Id: I959bab2f7a83a1b9160d7f010a0de9638b30cf07 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/6465 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
		@@ -24,20 +24,16 @@
 | 
				
			|||||||
#include <device/pnp.h>
 | 
					#include <device/pnp.h>
 | 
				
			||||||
#include <superio/conf_mode.h>
 | 
					#include <superio/conf_mode.h>
 | 
				
			||||||
#include <console/console.h>
 | 
					#include <console/console.h>
 | 
				
			||||||
#include <device/smbus.h>
 | 
					 | 
				
			||||||
#include <string.h>
 | 
					 | 
				
			||||||
#include <pc80/keyboard.h>
 | 
					 | 
				
			||||||
#include <stdlib.h>
 | 
					#include <stdlib.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "sio1036.h"
 | 
					#include "sio1036.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Forward declarations */
 | 
					static void sio1036_init(device_t dev)
 | 
				
			||||||
static void enable_dev(device_t dev);
 | 
					{
 | 
				
			||||||
static void sio1036_init(device_t dev);
 | 
						if (!dev->enabled) {
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
struct chip_operations superio_smsc_sio1036_ops = {
 | 
						}
 | 
				
			||||||
	CHIP_NAME("SMSC SIO1036 Super I/O")
 | 
					}
 | 
				
			||||||
		.enable_dev = enable_dev
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct device_operations ops = {
 | 
					static struct device_operations ops = {
 | 
				
			||||||
	.read_resources   = pnp_read_resources,
 | 
						.read_resources   = pnp_read_resources,
 | 
				
			||||||
@@ -49,27 +45,15 @@ static struct device_operations ops = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct pnp_info pnp_dev_info[] = {
 | 
					static struct pnp_info pnp_dev_info[] = {
 | 
				
			||||||
	{},
 | 
						{ &ops, SIO1036_SP1,  PNP_IO0 | PNP_IRQ0, {0x07f8, 0}, },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void enable_dev(device_t dev)
 | 
					static void enable_dev(device_t dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	pnp_enable_devices(dev, &pnp_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
 | 
						pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void sio1036_init(device_t dev)
 | 
					struct chip_operations superio_smsc_sio1036_ops = {
 | 
				
			||||||
{
 | 
						CHIP_NAME("SMSC SIO1036 Super I/O")
 | 
				
			||||||
	struct resource *res0, *res1;
 | 
						.enable_dev = enable_dev
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!dev->enabled) {
 | 
					 | 
				
			||||||
		return;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	switch(dev->path.pnp.device) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		default:
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user