Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c-dev: Fix all coding style issues

Fix all coding style issues found by checkpatch.pl.

Signed-off-by: Farid Hammane <farid.hammane@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

authored by

Farid Hammane and committed by
Jean Delvare
ae5624fc 7225acf4

+15 -15
+15 -15
drivers/i2c/i2c-dev.c
··· 35 35 #include <linux/i2c.h> 36 36 #include <linux/i2c-dev.h> 37 37 #include <linux/jiffies.h> 38 - #include <asm/uaccess.h> 38 + #include <linux/uaccess.h> 39 39 40 40 static struct i2c_driver i2cdev_driver; 41 41 ··· 132 132 * needed by those system calls and by this SMBus interface. 133 133 */ 134 134 135 - static ssize_t i2cdev_read (struct file *file, char __user *buf, size_t count, 136 - loff_t *offset) 135 + static ssize_t i2cdev_read(struct file *file, char __user *buf, size_t count, 136 + loff_t *offset) 137 137 { 138 138 char *tmp; 139 139 int ret; ··· 143 143 if (count > 8192) 144 144 count = 8192; 145 145 146 - tmp = kmalloc(count,GFP_KERNEL); 147 - if (tmp==NULL) 146 + tmp = kmalloc(count, GFP_KERNEL); 147 + if (tmp == NULL) 148 148 return -ENOMEM; 149 149 150 150 pr_debug("i2c-dev: i2c-%d reading %zu bytes.\n", 151 151 iminor(file->f_path.dentry->d_inode), count); 152 152 153 - ret = i2c_master_recv(client,tmp,count); 153 + ret = i2c_master_recv(client, tmp, count); 154 154 if (ret >= 0) 155 - ret = copy_to_user(buf,tmp,count)?-EFAULT:ret; 155 + ret = copy_to_user(buf, tmp, count) ? -EFAULT : ret; 156 156 kfree(tmp); 157 157 return ret; 158 158 } 159 159 160 - static ssize_t i2cdev_write (struct file *file, const char __user *buf, size_t count, 161 - loff_t *offset) 160 + static ssize_t i2cdev_write(struct file *file, const char __user *buf, 161 + size_t count, loff_t *offset) 162 162 { 163 163 int ret; 164 164 char *tmp; ··· 167 167 if (count > 8192) 168 168 count = 8192; 169 169 170 - tmp = kmalloc(count,GFP_KERNEL); 171 - if (tmp==NULL) 170 + tmp = kmalloc(count, GFP_KERNEL); 171 + if (tmp == NULL) 172 172 return -ENOMEM; 173 - if (copy_from_user(tmp,buf,count)) { 173 + if (copy_from_user(tmp, buf, count)) { 174 174 kfree(tmp); 175 175 return -EFAULT; 176 176 } ··· 178 178 pr_debug("i2c-dev: i2c-%d writing %zu bytes.\n", 179 179 iminor(file->f_path.dentry->d_inode), count); 180 180 181 - ret = i2c_master_send(client,tmp,count); 181 + ret = i2c_master_send(client, tmp, count); 182 182 kfree(tmp); 183 183 return ret; 184 184 } ··· 375 375 dev_dbg(&client->adapter->dev, "ioctl, cmd=0x%02x, arg=0x%02lx\n", 376 376 cmd, arg); 377 377 378 - switch ( cmd ) { 378 + switch (cmd) { 379 379 case I2C_SLAVE: 380 380 case I2C_SLAVE_FORCE: 381 381 /* NOTE: devices set up to work with "new style" drivers ··· 601 601 { 602 602 i2c_del_driver(&i2cdev_driver); 603 603 class_destroy(i2c_dev_class); 604 - unregister_chrdev(I2C_MAJOR,"i2c"); 604 + unregister_chrdev(I2C_MAJOR, "i2c"); 605 605 } 606 606 607 607 MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and "