aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-08-13 05:19:56 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-08-14 02:49:26 -0400
commit3bbaf812065e8b0feca02b6c7e5117b731709008 (patch)
tree457cd22d6ec52ed5ee309c40b77787618f779e61 /drivers/bluetooth
parent66f4e0e43a0389a7f2814f0cc6df39019aead54f (diff)
Bluetooth: Remove typedef bt3c_info_t
The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for bt3c_info_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier i; type td; @@ -typedef struct i { ... } -td ; @@ type tn.td; identifier tn.i; @@ -td + struct i Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/bt3c_cs.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index 1d82721cf9c6..4f7e8d400bc0 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -67,7 +67,7 @@ MODULE_FIRMWARE("BT3CPCC.bin");
67/* ======================== Local structures ======================== */ 67/* ======================== Local structures ======================== */
68 68
69 69
70typedef struct bt3c_info_t { 70struct bt3c_info {
71 struct pcmcia_device *p_dev; 71 struct pcmcia_device *p_dev;
72 72
73 struct hci_dev *hdev; 73 struct hci_dev *hdev;
@@ -80,7 +80,7 @@ typedef struct bt3c_info_t {
80 unsigned long rx_state; 80 unsigned long rx_state;
81 unsigned long rx_count; 81 unsigned long rx_count;
82 struct sk_buff *rx_skb; 82 struct sk_buff *rx_skb;
83} bt3c_info_t; 83};
84 84
85 85
86static int bt3c_config(struct pcmcia_device *link); 86static int bt3c_config(struct pcmcia_device *link);
@@ -175,7 +175,7 @@ static int bt3c_write(unsigned int iobase, int fifo_size, __u8 *buf, int len)
175} 175}
176 176
177 177
178static void bt3c_write_wakeup(bt3c_info_t *info) 178static void bt3c_write_wakeup(struct bt3c_info *info)
179{ 179{
180 if (!info) { 180 if (!info) {
181 BT_ERR("Unknown device"); 181 BT_ERR("Unknown device");
@@ -214,7 +214,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info)
214} 214}
215 215
216 216
217static void bt3c_receive(bt3c_info_t *info) 217static void bt3c_receive(struct bt3c_info *info)
218{ 218{
219 unsigned int iobase; 219 unsigned int iobase;
220 int size = 0, avail; 220 int size = 0, avail;
@@ -336,7 +336,7 @@ static void bt3c_receive(bt3c_info_t *info)
336 336
337static irqreturn_t bt3c_interrupt(int irq, void *dev_inst) 337static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
338{ 338{
339 bt3c_info_t *info = dev_inst; 339 struct bt3c_info *info = dev_inst;
340 unsigned int iobase; 340 unsigned int iobase;
341 int iir; 341 int iir;
342 irqreturn_t r = IRQ_NONE; 342 irqreturn_t r = IRQ_NONE;
@@ -388,7 +388,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
388 388
389static int bt3c_hci_flush(struct hci_dev *hdev) 389static int bt3c_hci_flush(struct hci_dev *hdev)
390{ 390{
391 bt3c_info_t *info = hci_get_drvdata(hdev); 391 struct bt3c_info *info = hci_get_drvdata(hdev);
392 392
393 /* Drop TX queue */ 393 /* Drop TX queue */
394 skb_queue_purge(&(info->txq)); 394 skb_queue_purge(&(info->txq));
@@ -418,7 +418,7 @@ static int bt3c_hci_close(struct hci_dev *hdev)
418 418
419static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) 419static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
420{ 420{
421 bt3c_info_t *info = hci_get_drvdata(hdev); 421 struct bt3c_info *info = hci_get_drvdata(hdev);
422 unsigned long flags; 422 unsigned long flags;
423 423
424 switch (bt_cb(skb)->pkt_type) { 424 switch (bt_cb(skb)->pkt_type) {
@@ -451,7 +451,8 @@ static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
451/* ======================== Card services HCI interaction ======================== */ 451/* ======================== Card services HCI interaction ======================== */
452 452
453 453
454static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware, 454static int bt3c_load_firmware(struct bt3c_info *info,
455 const unsigned char *firmware,
455 int count) 456 int count)
456{ 457{
457 char *ptr = (char *) firmware; 458 char *ptr = (char *) firmware;
@@ -536,7 +537,7 @@ error:
536} 537}
537 538
538 539
539static int bt3c_open(bt3c_info_t *info) 540static int bt3c_open(struct bt3c_info *info)
540{ 541{
541 const struct firmware *firmware; 542 const struct firmware *firmware;
542 struct hci_dev *hdev; 543 struct hci_dev *hdev;
@@ -603,7 +604,7 @@ error:
603} 604}
604 605
605 606
606static int bt3c_close(bt3c_info_t *info) 607static int bt3c_close(struct bt3c_info *info)
607{ 608{
608 struct hci_dev *hdev = info->hdev; 609 struct hci_dev *hdev = info->hdev;
609 610
@@ -620,7 +621,7 @@ static int bt3c_close(bt3c_info_t *info)
620 621
621static int bt3c_probe(struct pcmcia_device *link) 622static int bt3c_probe(struct pcmcia_device *link)
622{ 623{
623 bt3c_info_t *info; 624 struct bt3c_info *info;
624 625
625 /* Create new info device */ 626 /* Create new info device */
626 info = devm_kzalloc(&link->dev, sizeof(*info), GFP_KERNEL); 627 info = devm_kzalloc(&link->dev, sizeof(*info), GFP_KERNEL);
@@ -683,7 +684,7 @@ static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev,
683 684
684static int bt3c_config(struct pcmcia_device *link) 685static int bt3c_config(struct pcmcia_device *link)
685{ 686{
686 bt3c_info_t *info = link->priv; 687 struct bt3c_info *info = link->priv;
687 int i; 688 int i;
688 unsigned long try; 689 unsigned long try;
689 690
@@ -724,7 +725,7 @@ failed:
724 725
725static void bt3c_release(struct pcmcia_device *link) 726static void bt3c_release(struct pcmcia_device *link)
726{ 727{
727 bt3c_info_t *info = link->priv; 728 struct bt3c_info *info = link->priv;
728 729
729 bt3c_close(info); 730 bt3c_close(info);
730 731