aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2011-10-10 21:30:56 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-10-10 21:35:10 -0400
commit15a564d8dbfc9429540c2d9b38a64d1909de8b24 (patch)
treec31364eddd6d1e88e776ace95af345ed5e98b1fd /drivers/input/serio
parent8d92847700870e33cb92b43bde0a81f5a4298028 (diff)
Input: serio_raw - fix coding style issues
This makes checkpatch.pl happy with the driver Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/serio_raw.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c
index 396a17fcc344..64fcefb50fbe 100644
--- a/drivers/input/serio/serio_raw.c
+++ b/drivers/input/serio/serio_raw.c
@@ -156,7 +156,8 @@ static bool serio_raw_fetch_byte(struct serio_raw *serio_raw, char *c)
156 return !empty; 156 return !empty;
157} 157}
158 158
159static ssize_t serio_raw_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) 159static ssize_t serio_raw_read(struct file *file, char __user *buffer,
160 size_t count, loff_t *ppos)
160{ 161{
161 struct serio_raw_client *client = file->private_data; 162 struct serio_raw_client *client = file->private_data;
162 struct serio_raw *serio_raw = client->serio_raw; 163 struct serio_raw *serio_raw = client->serio_raw;
@@ -187,7 +188,8 @@ static ssize_t serio_raw_read(struct file *file, char __user *buffer, size_t cou
187 return retval; 188 return retval;
188} 189}
189 190
190static ssize_t serio_raw_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) 191static ssize_t serio_raw_write(struct file *file, const char __user *buffer,
192 size_t count, loff_t *ppos)
191{ 193{
192 struct serio_raw_client *client = file->private_data; 194 struct serio_raw_client *client = file->private_data;
193 struct serio_raw *serio_raw = client->serio_raw; 195 struct serio_raw *serio_raw = client->serio_raw;
@@ -250,7 +252,7 @@ static const struct file_operations serio_raw_fops = {
250 252
251 253
252/********************************************************************* 254/*********************************************************************
253 * Interface with serio port * 255 * Interface with serio port *
254 *********************************************************************/ 256 *********************************************************************/
255 257
256static irqreturn_t serio_raw_interrupt(struct serio *serio, unsigned char data, 258static irqreturn_t serio_raw_interrupt(struct serio *serio, unsigned char data,
@@ -278,14 +280,16 @@ static int serio_raw_connect(struct serio *serio, struct serio_driver *drv)
278 struct serio_raw *serio_raw; 280 struct serio_raw *serio_raw;
279 int err; 281 int err;
280 282
281 if (!(serio_raw = kzalloc(sizeof(struct serio_raw), GFP_KERNEL))) { 283 serio_raw = kzalloc(sizeof(struct serio_raw), GFP_KERNEL);
284 if (!serio_raw) {
282 dev_dbg(&serio->dev, "can't allocate memory for a device\n"); 285 dev_dbg(&serio->dev, "can't allocate memory for a device\n");
283 return -ENOMEM; 286 return -ENOMEM;
284 } 287 }
285 288
286 mutex_lock(&serio_raw_mutex); 289 mutex_lock(&serio_raw_mutex);
287 290
288 snprintf(serio_raw->name, sizeof(serio_raw->name), "serio_raw%d", serio_raw_no++); 291 snprintf(serio_raw->name, sizeof(serio_raw->name),
292 "serio_raw%d", serio_raw_no++);
289 kref_init(&serio_raw->kref); 293 kref_init(&serio_raw->kref);
290 serio_raw->serio = serio; 294 serio_raw->serio = serio;
291 INIT_LIST_HEAD(&serio_raw->client_list); 295 INIT_LIST_HEAD(&serio_raw->client_list);