[PATCH 2.5.xx] - i2c-prosavage driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 18, 2003 at 01:30:17AM +0200, henk wrote:
> 
> Had too much fun -> adapted codingstyle

Oh so close:

> +static void bit_s3via_setscl(void *cr, int val)
> +{
> +	unsigned int r;
> +	r = getCR1((unsigned int)cr);
> +	r |= I2C_ENAB;
> +	if(val)	{

Put a space after if and for statments, before the '('.

> +	switch(reg) {
> +	case IOREG_SERIAL1:
> +	    snprintf(p->adap.dev.name, sizeof(p->adap.dev.name),
> +		"ProSavage I2C bus at %02x:%02x.%x", dev->bus->number,
> +		PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
> +	    break;

You still need to indent the lines within the case statment with a tab,
not 4 spaces :)

> +		if(tmp != (u8)getCR1(IOREG_SUBSYS + i)) {
> +		    printk(DRIVER_ID ": Video IO registers redirected?\n");   
> +		    return -ENODEV;
> +		}

More tabs needed...

> +static void __devexit prosavage_remove(struct pci_dev *dev)
> +{
> +	int ret;
> +	while(i2c_bus_cnt > 0) {
> +		i2c_bus_cnt--;
> +	        ret = i2c_bit_del_bus(&i2c_bus[i2c_bus_cnt].adap);
> +	        if(ret) {
> +        	    printk(DRIVER_ID ": %s not removed\n",
> +			i2c_bus[i2c_bus_cnt].adap.dev.name);
> +		}
> +	}
> +}

And yet more here too.

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux