aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-10-28 05:11:39 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-03 19:32:59 -0500
commite732b93c3276548bfa903d79c2083b2c8dc552af (patch)
treefbee0d7f28ab8d3952fae8934aedd88c83b772fb
parentb95b9d6cdecabfd99e074d6fda51dc962fd2a1cf (diff)
parport: remove unneeded space
checkpatch complains that space is prohibited between function name and open parenthesis '('. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/parport/share.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index ccd7df458ebc..b68f19480dcf 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -54,16 +54,16 @@ static LIST_HEAD(drivers);
54static DEFINE_MUTEX(registration_lock); 54static DEFINE_MUTEX(registration_lock);
55 55
56/* What you can do to a port that's gone away.. */ 56/* What you can do to a port that's gone away.. */
57static void dead_write_lines (struct parport *p, unsigned char b){} 57static void dead_write_lines(struct parport *p, unsigned char b){}
58static unsigned char dead_read_lines (struct parport *p) { return 0; } 58static unsigned char dead_read_lines(struct parport *p) { return 0; }
59static unsigned char dead_frob_lines (struct parport *p, unsigned char b, 59static unsigned char dead_frob_lines(struct parport *p, unsigned char b,
60 unsigned char c) { return 0; } 60 unsigned char c) { return 0; }
61static void dead_onearg (struct parport *p){} 61static void dead_onearg(struct parport *p){}
62static void dead_initstate (struct pardevice *d, struct parport_state *s) { } 62static void dead_initstate(struct pardevice *d, struct parport_state *s) { }
63static void dead_state (struct parport *p, struct parport_state *s) { } 63static void dead_state(struct parport *p, struct parport_state *s) { }
64static size_t dead_write (struct parport *p, const void *b, size_t l, int f) 64static size_t dead_write(struct parport *p, const void *b, size_t l, int f)
65{ return 0; } 65{ return 0; }
66static size_t dead_read (struct parport *p, void *b, size_t l, int f) 66static size_t dead_read(struct parport *p, void *b, size_t l, int f)
67{ return 0; } 67{ return 0; }
68static struct parport_operations dead_ops = { 68static struct parport_operations dead_ops = {
69 .write_data = dead_write_lines, /* data */ 69 .write_data = dead_write_lines, /* data */
@@ -194,7 +194,7 @@ static void detach_driver_chain(struct parport *port)
194 struct parport_driver *drv; 194 struct parport_driver *drv;
195 /* caller has exclusive registration_lock */ 195 /* caller has exclusive registration_lock */
196 list_for_each_entry(drv, &drivers, list) 196 list_for_each_entry(drv, &drivers, list)
197 drv->detach (port); 197 drv->detach(port);
198 198
199 /* 199 /*
200 * call the detach function of the drivers registered in 200 * call the detach function of the drivers registered in
@@ -205,13 +205,13 @@ static void detach_driver_chain(struct parport *port)
205} 205}
206 206
207/* Ask kmod for some lowlevel drivers. */ 207/* Ask kmod for some lowlevel drivers. */
208static void get_lowlevel_driver (void) 208static void get_lowlevel_driver(void)
209{ 209{
210 /* 210 /*
211 * There is no actual module called this: you should set 211 * There is no actual module called this: you should set
212 * up an alias for modutils. 212 * up an alias for modutils.
213 */ 213 */
214 request_module ("parport_lowlevel"); 214 request_module("parport_lowlevel");
215} 215}
216 216
217/* 217/*
@@ -267,7 +267,7 @@ int __parport_register_driver(struct parport_driver *drv, struct module *owner,
267 const char *mod_name) 267 const char *mod_name)
268{ 268{
269 if (list_empty(&portlist)) 269 if (list_empty(&portlist))
270 get_lowlevel_driver (); 270 get_lowlevel_driver();
271 271
272 if (drv->devmodel) { 272 if (drv->devmodel) {
273 /* using device model */ 273 /* using device model */
@@ -330,7 +330,7 @@ static int port_detach(struct device *dev, void *_drv)
330 * finished by the time this function returns. 330 * finished by the time this function returns.
331 **/ 331 **/
332 332
333void parport_unregister_driver (struct parport_driver *drv) 333void parport_unregister_driver(struct parport_driver *drv)
334{ 334{
335 struct parport *port; 335 struct parport *port;
336 336
@@ -375,7 +375,7 @@ static void free_port(struct device *dev)
375 * until the matching parport_put_port() call. 375 * until the matching parport_put_port() call.
376 **/ 376 **/
377 377
378struct parport *parport_get_port (struct parport *port) 378struct parport *parport_get_port(struct parport *port)
379{ 379{
380 struct device *dev = get_device(&port->bus_dev); 380 struct device *dev = get_device(&port->bus_dev);
381 381
@@ -398,7 +398,7 @@ EXPORT_SYMBOL(parport_del_port);
398 * zero (port is no longer used), free_port is called. 398 * zero (port is no longer used), free_port is called.
399 **/ 399 **/
400 400
401void parport_put_port (struct parport *port) 401void parport_put_port(struct parport *port)
402{ 402{
403 put_device(&port->bus_dev); 403 put_device(&port->bus_dev);
404} 404}
@@ -458,7 +458,7 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma,
458 tmp->flags = 0; 458 tmp->flags = 0;
459 tmp->ops = ops; 459 tmp->ops = ops;
460 tmp->physport = tmp; 460 tmp->physport = tmp;
461 memset (tmp->probe_info, 0, 5 * sizeof (struct parport_device_info)); 461 memset(tmp->probe_info, 0, 5 * sizeof(struct parport_device_info));
462 rwlock_init(&tmp->cad_lock); 462 rwlock_init(&tmp->cad_lock);
463 spin_lock_init(&tmp->waitlist_lock); 463 spin_lock_init(&tmp->waitlist_lock);
464 spin_lock_init(&tmp->pardevice_lock); 464 spin_lock_init(&tmp->pardevice_lock);
@@ -466,7 +466,7 @@ struct parport *parport_register_port(unsigned long base, int irq, int dma,
466 tmp->ieee1284.phase = IEEE1284_PH_FWD_IDLE; 466 tmp->ieee1284.phase = IEEE1284_PH_FWD_IDLE;
467 sema_init(&tmp->ieee1284.irq, 0); 467 sema_init(&tmp->ieee1284.irq, 0);
468 tmp->spintime = parport_default_spintime; 468 tmp->spintime = parport_default_spintime;
469 atomic_set (&tmp->ref_count, 1); 469 atomic_set(&tmp->ref_count, 1);
470 INIT_LIST_HEAD(&tmp->full_list); 470 INIT_LIST_HEAD(&tmp->full_list);
471 471
472 name = kmalloc(15, GFP_KERNEL); 472 name = kmalloc(15, GFP_KERNEL);
@@ -524,7 +524,7 @@ EXPORT_SYMBOL(parport_register_port);
524 * functions will be called, with @port as the parameter. 524 * functions will be called, with @port as the parameter.
525 **/ 525 **/
526 526
527void parport_announce_port (struct parport *port) 527void parport_announce_port(struct parport *port)
528{ 528{
529 int i; 529 int i;
530 530
@@ -549,7 +549,7 @@ void parport_announce_port (struct parport *port)
549 spin_unlock_irq(&parportlist_lock); 549 spin_unlock_irq(&parportlist_lock);
550 550
551 /* Let drivers know that new port(s) has arrived. */ 551 /* Let drivers know that new port(s) has arrived. */
552 attach_driver_chain (port); 552 attach_driver_chain(port);
553 for (i = 1; i < 3; i++) { 553 for (i = 1; i < 3; i++) {
554 struct parport *slave = port->slaves[i-1]; 554 struct parport *slave = port->slaves[i-1];
555 if (slave) 555 if (slave)
@@ -585,7 +585,7 @@ void parport_remove_port(struct parport *port)
585 mutex_lock(&registration_lock); 585 mutex_lock(&registration_lock);
586 586
587 /* Spread the word. */ 587 /* Spread the word. */
588 detach_driver_chain (port); 588 detach_driver_chain(port);
589 589
590#ifdef CONFIG_PARPORT_1284 590#ifdef CONFIG_PARPORT_1284
591 /* Forget the IEEE1284.3 topology of the port. */ 591 /* Forget the IEEE1284.3 topology of the port. */
@@ -700,7 +700,7 @@ parport_register_device(struct parport *port, const char *name,
700 700
701 if (port->physport->flags & PARPORT_FLAG_EXCL) { 701 if (port->physport->flags & PARPORT_FLAG_EXCL) {
702 /* An exclusive device is registered. */ 702 /* An exclusive device is registered. */
703 printk (KERN_DEBUG "%s: no more devices allowed\n", 703 printk(KERN_DEBUG "%s: no more devices allowed\n",
704 port->name); 704 port->name);
705 return NULL; 705 return NULL;
706 } 706 }
@@ -735,7 +735,7 @@ parport_register_device(struct parport *port, const char *name,
735 if (!try_module_get(port->ops->owner)) 735 if (!try_module_get(port->ops->owner))
736 return NULL; 736 return NULL;
737 737
738 parport_get_port (port); 738 parport_get_port(port);
739 739
740 tmp = kmalloc(sizeof(struct pardevice), GFP_KERNEL); 740 tmp = kmalloc(sizeof(struct pardevice), GFP_KERNEL);
741 if (!tmp) 741 if (!tmp)
@@ -767,8 +767,8 @@ parport_register_device(struct parport *port, const char *name,
767 767
768 if (flags & PARPORT_DEV_EXCL) { 768 if (flags & PARPORT_DEV_EXCL) {
769 if (port->physport->devices) { 769 if (port->physport->devices) {
770 spin_unlock (&port->physport->pardevice_lock); 770 spin_unlock(&port->physport->pardevice_lock);
771 printk (KERN_DEBUG 771 printk(KERN_DEBUG
772 "%s: cannot grant exclusive access for device %s\n", 772 "%s: cannot grant exclusive access for device %s\n",
773 port->name, name); 773 port->name, name);
774 goto out_free_all; 774 goto out_free_all;
@@ -807,7 +807,7 @@ parport_register_device(struct parport *port, const char *name,
807 out_free_pardevice: 807 out_free_pardevice:
808 kfree(tmp); 808 kfree(tmp);
809 out: 809 out:
810 parport_put_port (port); 810 parport_put_port(port);
811 module_put(port->ops->owner); 811 module_put(port->ops->owner);
812 812
813 return NULL; 813 return NULL;
@@ -988,7 +988,7 @@ void parport_unregister_device(struct pardevice *dev)
988 if (port->cad == dev) { 988 if (port->cad == dev) {
989 printk(KERN_DEBUG "%s: %s forgot to release port\n", 989 printk(KERN_DEBUG "%s: %s forgot to release port\n",
990 port->name, dev->name); 990 port->name, dev->name);
991 parport_release (dev); 991 parport_release(dev);
992 } 992 }
993 993
994 spin_lock(&port->pardevice_lock); 994 spin_lock(&port->pardevice_lock);
@@ -1028,7 +1028,7 @@ void parport_unregister_device(struct pardevice *dev)
1028 kfree(dev); 1028 kfree(dev);
1029 1029
1030 module_put(port->ops->owner); 1030 module_put(port->ops->owner);
1031 parport_put_port (port); 1031 parport_put_port(port);
1032} 1032}
1033EXPORT_SYMBOL(parport_unregister_device); 1033EXPORT_SYMBOL(parport_unregister_device);
1034 1034
@@ -1044,21 +1044,21 @@ EXPORT_SYMBOL(parport_unregister_device);
1044 * gives you, use parport_put_port(). 1044 * gives you, use parport_put_port().
1045 */ 1045 */
1046 1046
1047struct parport *parport_find_number (int number) 1047struct parport *parport_find_number(int number)
1048{ 1048{
1049 struct parport *port, *result = NULL; 1049 struct parport *port, *result = NULL;
1050 1050
1051 if (list_empty(&portlist)) 1051 if (list_empty(&portlist))
1052 get_lowlevel_driver (); 1052 get_lowlevel_driver();
1053 1053
1054 spin_lock (&parportlist_lock); 1054 spin_lock(&parportlist_lock);
1055 list_for_each_entry(port, &portlist, list) { 1055 list_for_each_entry(port, &portlist, list) {
1056 if (port->number == number) { 1056 if (port->number == number) {
1057 result = parport_get_port (port); 1057 result = parport_get_port(port);
1058 break; 1058 break;
1059 } 1059 }
1060 } 1060 }
1061 spin_unlock (&parportlist_lock); 1061 spin_unlock(&parportlist_lock);
1062 return result; 1062 return result;
1063} 1063}
1064EXPORT_SYMBOL(parport_find_number); 1064EXPORT_SYMBOL(parport_find_number);
@@ -1075,21 +1075,21 @@ EXPORT_SYMBOL(parport_find_number);
1075 * gives you, use parport_put_port(). 1075 * gives you, use parport_put_port().
1076 */ 1076 */
1077 1077
1078struct parport *parport_find_base (unsigned long base) 1078struct parport *parport_find_base(unsigned long base)
1079{ 1079{
1080 struct parport *port, *result = NULL; 1080 struct parport *port, *result = NULL;
1081 1081
1082 if (list_empty(&portlist)) 1082 if (list_empty(&portlist))
1083 get_lowlevel_driver (); 1083 get_lowlevel_driver();
1084 1084
1085 spin_lock (&parportlist_lock); 1085 spin_lock(&parportlist_lock);
1086 list_for_each_entry(port, &portlist, list) { 1086 list_for_each_entry(port, &portlist, list) {
1087 if (port->base == base) { 1087 if (port->base == base) {
1088 result = parport_get_port (port); 1088 result = parport_get_port(port);
1089 break; 1089 break;
1090 } 1090 }
1091 } 1091 }
1092 spin_unlock (&parportlist_lock); 1092 spin_unlock(&parportlist_lock);
1093 return result; 1093 return result;
1094} 1094}
1095EXPORT_SYMBOL(parport_find_base); 1095EXPORT_SYMBOL(parport_find_base);
@@ -1119,7 +1119,7 @@ int parport_claim(struct pardevice *dev)
1119 } 1119 }
1120 1120
1121 /* Preempt any current device */ 1121 /* Preempt any current device */
1122 write_lock_irqsave (&port->cad_lock, flags); 1122 write_lock_irqsave(&port->cad_lock, flags);
1123 if ((oldcad = port->cad) != NULL) { 1123 if ((oldcad = port->cad) != NULL) {
1124 if (oldcad->preempt) { 1124 if (oldcad->preempt) {
1125 if (oldcad->preempt(oldcad->private)) 1125 if (oldcad->preempt(oldcad->private))
@@ -1146,7 +1146,7 @@ int parport_claim(struct pardevice *dev)
1146 dev->waiting = 0; 1146 dev->waiting = 0;
1147 1147
1148 /* Take ourselves out of the wait list again. */ 1148 /* Take ourselves out of the wait list again. */
1149 spin_lock_irq (&port->waitlist_lock); 1149 spin_lock_irq(&port->waitlist_lock);
1150 if (dev->waitprev) 1150 if (dev->waitprev)
1151 dev->waitprev->waitnext = dev->waitnext; 1151 dev->waitprev->waitnext = dev->waitnext;
1152 else 1152 else
@@ -1155,7 +1155,7 @@ int parport_claim(struct pardevice *dev)
1155 dev->waitnext->waitprev = dev->waitprev; 1155 dev->waitnext->waitprev = dev->waitprev;
1156 else 1156 else
1157 port->waittail = dev->waitprev; 1157 port->waittail = dev->waitprev;
1158 spin_unlock_irq (&port->waitlist_lock); 1158 spin_unlock_irq(&port->waitlist_lock);
1159 dev->waitprev = dev->waitnext = NULL; 1159 dev->waitprev = dev->waitnext = NULL;
1160 } 1160 }
1161 1161
@@ -1172,7 +1172,7 @@ int parport_claim(struct pardevice *dev)
1172 /* If it's a daisy chain device, select it. */ 1172 /* If it's a daisy chain device, select it. */
1173 if (dev->daisy >= 0) { 1173 if (dev->daisy >= 0) {
1174 /* This could be lazier. */ 1174 /* This could be lazier. */
1175 if (!parport_daisy_select (port, dev->daisy, 1175 if (!parport_daisy_select(port, dev->daisy,
1176 IEEE1284_MODE_COMPAT)) 1176 IEEE1284_MODE_COMPAT))
1177 port->daisy = dev->daisy; 1177 port->daisy = dev->daisy;
1178 } 1178 }
@@ -1193,7 +1193,7 @@ blocked:
1193 1193
1194 /* The cad_lock is still held for writing here */ 1194 /* The cad_lock is still held for writing here */
1195 if (dev->waiting & 2 || dev->wakeup) { 1195 if (dev->waiting & 2 || dev->wakeup) {
1196 spin_lock (&port->waitlist_lock); 1196 spin_lock(&port->waitlist_lock);
1197 if (test_and_set_bit(0, &dev->waiting) == 0) { 1197 if (test_and_set_bit(0, &dev->waiting) == 0) {
1198 /* First add ourselves to the end of the wait list. */ 1198 /* First add ourselves to the end of the wait list. */
1199 dev->waitnext = NULL; 1199 dev->waitnext = NULL;
@@ -1204,9 +1204,9 @@ blocked:
1204 } else 1204 } else
1205 port->waithead = port->waittail = dev; 1205 port->waithead = port->waittail = dev;
1206 } 1206 }
1207 spin_unlock (&port->waitlist_lock); 1207 spin_unlock(&port->waitlist_lock);
1208 } 1208 }
1209 write_unlock_irqrestore (&port->cad_lock, flags); 1209 write_unlock_irqrestore(&port->cad_lock, flags);
1210 return -EAGAIN; 1210 return -EAGAIN;
1211} 1211}
1212EXPORT_SYMBOL(parport_claim); 1212EXPORT_SYMBOL(parport_claim);
@@ -1253,7 +1253,7 @@ int parport_claim_or_block(struct pardevice *dev)
1253 if (dev->waiting) { 1253 if (dev->waiting) {
1254 wait_event_interruptible(dev->wait_q, 1254 wait_event_interruptible(dev->wait_q,
1255 !dev->waiting); 1255 !dev->waiting);
1256 if (signal_pending (current)) 1256 if (signal_pending(current))
1257 return -EINTR; 1257 return -EINTR;
1258 r = 1; 1258 r = 1;
1259 } else { 1259 } else {
@@ -1294,7 +1294,7 @@ void parport_release(struct pardevice *dev)
1294 /* Make sure that dev is the current device */ 1294 /* Make sure that dev is the current device */
1295 write_lock_irqsave(&port->cad_lock, flags); 1295 write_lock_irqsave(&port->cad_lock, flags);
1296 if (port->cad != dev) { 1296 if (port->cad != dev) {
1297 write_unlock_irqrestore (&port->cad_lock, flags); 1297 write_unlock_irqrestore(&port->cad_lock, flags);
1298 printk(KERN_WARNING "%s: %s tried to release parport when not owner\n", 1298 printk(KERN_WARNING "%s: %s tried to release parport when not owner\n",
1299 port->name, dev->name); 1299 port->name, dev->name);
1300 return; 1300 return;
@@ -1309,7 +1309,7 @@ void parport_release(struct pardevice *dev)
1309 1309
1310 /* If this is a daisy device, deselect it. */ 1310 /* If this is a daisy device, deselect it. */
1311 if (dev->daisy >= 0) { 1311 if (dev->daisy >= 0) {
1312 parport_daisy_deselect_all (port); 1312 parport_daisy_deselect_all(port);
1313 port->daisy = -1; 1313 port->daisy = -1;
1314 } 1314 }
1315#endif 1315#endif