diff options
| author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-10-07 18:41:38 -0400 |
|---|---|---|
| committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-10-14 17:10:48 -0400 |
| commit | e21fcf798e246202d7b60e864f1d7302ebaaf41c (patch) | |
| tree | 8864afba6fb25e2c9b178ad8907b0c123463166f | |
| parent | 9fb551bf72929b316abb6d96cfb2ec05e896042a (diff) | |
firewire: cdev: normalize variable names
Unify some names:
- "e" for pointers to subtypes of struct event,
- "event" for struct members and pointers to struct event,
- "r" for pointers to subtypes of struct client_resource,
- "resource" for struct members and pointers to struct client_resource,
- other names for struct members and pointers to other types.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
| -rw-r--r-- | drivers/firewire/core-cdev.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index c5f63a939651..1accfaf96c6f 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c | |||
| @@ -178,7 +178,7 @@ struct iso_interrupt_event { | |||
| 178 | 178 | ||
| 179 | struct iso_resource_event { | 179 | struct iso_resource_event { |
| 180 | struct event event; | 180 | struct event event; |
| 181 | struct fw_cdev_event_iso_resource resource; | 181 | struct fw_cdev_event_iso_resource iso_resource; |
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | static inline void __user *u64_to_uptr(__u64 value) | 184 | static inline void __user *u64_to_uptr(__u64 value) |
| @@ -435,26 +435,26 @@ static int add_client_resource(struct client *client, | |||
| 435 | 435 | ||
| 436 | static int release_client_resource(struct client *client, u32 handle, | 436 | static int release_client_resource(struct client *client, u32 handle, |
| 437 | client_resource_release_fn_t release, | 437 | client_resource_release_fn_t release, |
| 438 | struct client_resource **resource) | 438 | struct client_resource **return_resource) |
| 439 | { | 439 | { |
| 440 | struct client_resource *r; | 440 | struct client_resource *resource; |
| 441 | 441 | ||
| 442 | spin_lock_irq(&client->lock); | 442 | spin_lock_irq(&client->lock); |
| 443 | if (client->in_shutdown) | 443 | if (client->in_shutdown) |
| 444 | r = NULL; | 444 | resource = NULL; |
| 445 | else | 445 | else |
| 446 | r = idr_find(&client->resource_idr, handle); | 446 | resource = idr_find(&client->resource_idr, handle); |
| 447 | if (r && r->release == release) | 447 | if (resource && resource->release == release) |
| 448 | idr_remove(&client->resource_idr, handle); | 448 | idr_remove(&client->resource_idr, handle); |
| 449 | spin_unlock_irq(&client->lock); | 449 | spin_unlock_irq(&client->lock); |
| 450 | 450 | ||
| 451 | if (!(r && r->release == release)) | 451 | if (!(resource && resource->release == release)) |
| 452 | return -EINVAL; | 452 | return -EINVAL; |
| 453 | 453 | ||
| 454 | if (resource) | 454 | if (return_resource) |
| 455 | *resource = r; | 455 | *return_resource = resource; |
| 456 | else | 456 | else |
| 457 | r->release(client, r); | 457 | resource->release(client, resource); |
| 458 | 458 | ||
| 459 | client_put(client); | 459 | client_put(client); |
| 460 | 460 | ||
| @@ -1108,12 +1108,12 @@ static void iso_resource_work(struct work_struct *work) | |||
| 1108 | e = r->e_dealloc; | 1108 | e = r->e_dealloc; |
| 1109 | r->e_dealloc = NULL; | 1109 | r->e_dealloc = NULL; |
| 1110 | } | 1110 | } |
| 1111 | e->resource.handle = r->resource.handle; | 1111 | e->iso_resource.handle = r->resource.handle; |
| 1112 | e->resource.channel = channel; | 1112 | e->iso_resource.channel = channel; |
| 1113 | e->resource.bandwidth = bandwidth; | 1113 | e->iso_resource.bandwidth = bandwidth; |
| 1114 | 1114 | ||
| 1115 | queue_event(client, &e->event, | 1115 | queue_event(client, &e->event, |
| 1116 | &e->resource, sizeof(e->resource), NULL, 0); | 1116 | &e->iso_resource, sizeof(e->iso_resource), NULL, 0); |
| 1117 | 1117 | ||
| 1118 | if (free) { | 1118 | if (free) { |
| 1119 | cancel_delayed_work(&r->work); | 1119 | cancel_delayed_work(&r->work); |
| @@ -1166,10 +1166,10 @@ static int init_iso_resource(struct client *client, | |||
| 1166 | r->e_alloc = e1; | 1166 | r->e_alloc = e1; |
| 1167 | r->e_dealloc = e2; | 1167 | r->e_dealloc = e2; |
| 1168 | 1168 | ||
| 1169 | e1->resource.closure = request->closure; | 1169 | e1->iso_resource.closure = request->closure; |
| 1170 | e1->resource.type = FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED; | 1170 | e1->iso_resource.type = FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED; |
| 1171 | e2->resource.closure = request->closure; | 1171 | e2->iso_resource.closure = request->closure; |
| 1172 | e2->resource.type = FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED; | 1172 | e2->iso_resource.type = FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED; |
| 1173 | 1173 | ||
| 1174 | if (todo == ISO_RES_ALLOC) { | 1174 | if (todo == ISO_RES_ALLOC) { |
| 1175 | r->resource.release = release_iso_resource; | 1175 | r->resource.release = release_iso_resource; |
| @@ -1394,10 +1394,10 @@ static int fw_device_op_mmap(struct file *file, struct vm_area_struct *vma) | |||
| 1394 | 1394 | ||
| 1395 | static int shutdown_resource(int id, void *p, void *data) | 1395 | static int shutdown_resource(int id, void *p, void *data) |
| 1396 | { | 1396 | { |
| 1397 | struct client_resource *r = p; | 1397 | struct client_resource *resource = p; |
| 1398 | struct client *client = data; | 1398 | struct client *client = data; |
| 1399 | 1399 | ||
| 1400 | r->release(client, r); | 1400 | resource->release(client, resource); |
| 1401 | client_put(client); | 1401 | client_put(client); |
| 1402 | 1402 | ||
| 1403 | return 0; | 1403 | return 0; |
| @@ -1406,7 +1406,7 @@ static int shutdown_resource(int id, void *p, void *data) | |||
| 1406 | static int fw_device_op_release(struct inode *inode, struct file *file) | 1406 | static int fw_device_op_release(struct inode *inode, struct file *file) |
| 1407 | { | 1407 | { |
| 1408 | struct client *client = file->private_data; | 1408 | struct client *client = file->private_data; |
| 1409 | struct event *e, *next_e; | 1409 | struct event *event, *next_event; |
| 1410 | 1410 | ||
| 1411 | mutex_lock(&client->device->client_list_mutex); | 1411 | mutex_lock(&client->device->client_list_mutex); |
| 1412 | list_del(&client->link); | 1412 | list_del(&client->link); |
| @@ -1427,8 +1427,8 @@ static int fw_device_op_release(struct inode *inode, struct file *file) | |||
| 1427 | idr_remove_all(&client->resource_idr); | 1427 | idr_remove_all(&client->resource_idr); |
| 1428 | idr_destroy(&client->resource_idr); | 1428 | idr_destroy(&client->resource_idr); |
| 1429 | 1429 | ||
| 1430 | list_for_each_entry_safe(e, next_e, &client->event_list, link) | 1430 | list_for_each_entry_safe(event, next_event, &client->event_list, link) |
| 1431 | kfree(e); | 1431 | kfree(event); |
| 1432 | 1432 | ||
| 1433 | client_put(client); | 1433 | client_put(client); |
| 1434 | 1434 | ||
