printk(KERN_ERR "%s: Wrong mode parameter for tps65010_set_led()\n", 
printk(KERN_ERR "%s: Wrong mode parameter for set_led()\n", 
int tps65010_set_led(unsigned led, unsigned mode){	int	 status;	unsigned led_on, led_per, offs;	if (!the_tps)		return -ENODEV;	if(led == LED1)		offs = 0;	else {		offs = 2;		led = LED2;	}	down(&the_tps->lock);	dev_dbg (&the_tps->client.dev, "led%i_on   0x%02x\n", led,		i2c_smbus_read_byte_data(&the_tps->client, TPS_LED1_ON + offs));	dev_dbg (&the_tps->client.dev, "led%i_per  0x%02x\n", led,		i2c_smbus_read_byte_data(&the_tps->client, TPS_LED1_PER + offs));	switch (mode) {	case OFF:		led_on  = 1 << 7;		led_per = 0 << 7;		break;	case ON:		led_on  = 1 << 7;		led_per = 1 << 7;		break;	case BLINK:		led_on  = 0x30 | (0 << 7);		led_per = 0x08 | (1 << 7);		break;	default:		printk(KERN_ERR "%s: Wrong mode parameter for tps65010_set_led()\n",		       DRIVER_NAME);		up(&the_tps->lock);		return -EINVAL;	}	status = i2c_smbus_write_byte_data(&the_tps->client,			TPS_LED1_ON + offs, led_on);	if (status != 0) {		printk(KERN_ERR "%s: Failed to write led%i_on register\n",		       DRIVER_NAME, led);		up(&the_tps->lock);		return status;	}	dev_dbg (&the_tps->client.dev, "led%i_on   0x%02x\n", led,		i2c_smbus_read_byte_data(&the_tps->client, TPS_LED1_ON + offs));	status = i2c_smbus_write_byte_data(&the_tps->client,			TPS_LED1_PER + offs, led_per);	if (status != 0) {		printk(KERN_ERR "%s: Failed to write led%i_per register\n",		       DRIVER_NAME, led);		up(&the_tps->lock);		return status;	}	dev_dbg (&the_tps->client.dev, "led%i_per  0x%02x\n", led,		i2c_smbus_read_byte_data(&the_tps->client, TPS_LED1_PER + offs));	up(&the_tps->lock);	return status;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/65fc50e50ff9f8b82c3756eccd7e7db6a267ffe9/tps65010.c/buggy/drivers/i2c/chips/tps65010.c