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

Bluetooth: Remove typedef bluecard_info_t

The Linux kernel coding style guidelines suggest not using typedefs
for structure types. This patch gets rid of the typedef for
bluecard_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>

authored by

Himangi Saraogi and committed by
Marcel Holtmann
d664cd98 f5588912

+18 -17
+18 -17
drivers/bluetooth/bluecard_cs.c
··· 61 61 /* ======================== Local structures ======================== */ 62 62 63 63 64 - typedef struct bluecard_info_t { 64 + struct bluecard_info { 65 65 struct pcmcia_device *p_dev; 66 66 67 67 struct hci_dev *hdev; ··· 78 78 79 79 unsigned char ctrl_reg; 80 80 unsigned long hw_state; /* Status of the hardware and LED control */ 81 - } bluecard_info_t; 81 + }; 82 82 83 83 84 84 static int bluecard_config(struct pcmcia_device *link); ··· 157 157 158 158 static void bluecard_activity_led_timeout(u_long arg) 159 159 { 160 - bluecard_info_t *info = (bluecard_info_t *)arg; 160 + struct bluecard_info *info = (struct bluecard_info *)arg; 161 161 unsigned int iobase = info->p_dev->resource[0]->start; 162 162 163 163 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) ··· 173 173 } 174 174 175 175 176 - static void bluecard_enable_activity_led(bluecard_info_t *info) 176 + static void bluecard_enable_activity_led(struct bluecard_info *info) 177 177 { 178 178 unsigned int iobase = info->p_dev->resource[0]->start; 179 179 ··· 215 215 } 216 216 217 217 218 - static void bluecard_write_wakeup(bluecard_info_t *info) 218 + static void bluecard_write_wakeup(struct bluecard_info *info) 219 219 { 220 220 if (!info) { 221 221 BT_ERR("Unknown device"); ··· 368 368 } 369 369 370 370 371 - static void bluecard_receive(bluecard_info_t *info, unsigned int offset) 371 + static void bluecard_receive(struct bluecard_info *info, 372 + unsigned int offset) 372 373 { 373 374 unsigned int iobase; 374 375 unsigned char buf[31]; ··· 498 497 499 498 static irqreturn_t bluecard_interrupt(int irq, void *dev_inst) 500 499 { 501 - bluecard_info_t *info = dev_inst; 500 + struct bluecard_info *info = dev_inst; 502 501 unsigned int iobase; 503 502 unsigned char reg; 504 503 ··· 563 562 564 563 static int bluecard_hci_set_baud_rate(struct hci_dev *hdev, int baud) 565 564 { 566 - bluecard_info_t *info = hci_get_drvdata(hdev); 565 + struct bluecard_info *info = hci_get_drvdata(hdev); 567 566 struct sk_buff *skb; 568 567 569 568 /* Ericsson baud rate command */ ··· 612 611 613 612 static int bluecard_hci_flush(struct hci_dev *hdev) 614 613 { 615 - bluecard_info_t *info = hci_get_drvdata(hdev); 614 + struct bluecard_info *info = hci_get_drvdata(hdev); 616 615 617 616 /* Drop TX queue */ 618 617 skb_queue_purge(&(info->txq)); ··· 623 622 624 623 static int bluecard_hci_open(struct hci_dev *hdev) 625 624 { 626 - bluecard_info_t *info = hci_get_drvdata(hdev); 625 + struct bluecard_info *info = hci_get_drvdata(hdev); 627 626 628 627 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) 629 628 bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE); ··· 644 643 645 644 static int bluecard_hci_close(struct hci_dev *hdev) 646 645 { 647 - bluecard_info_t *info = hci_get_drvdata(hdev); 646 + struct bluecard_info *info = hci_get_drvdata(hdev); 648 647 649 648 if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags))) 650 649 return 0; ··· 664 663 665 664 static int bluecard_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) 666 665 { 667 - bluecard_info_t *info = hci_get_drvdata(hdev); 666 + struct bluecard_info *info = hci_get_drvdata(hdev); 668 667 669 668 switch (bt_cb(skb)->pkt_type) { 670 669 case HCI_COMMAND_PKT: ··· 692 691 /* ======================== Card services HCI interaction ======================== */ 693 692 694 693 695 - static int bluecard_open(bluecard_info_t *info) 694 + static int bluecard_open(struct bluecard_info *info) 696 695 { 697 696 unsigned int iobase = info->p_dev->resource[0]->start; 698 697 struct hci_dev *hdev; ··· 807 806 } 808 807 809 808 810 - static int bluecard_close(bluecard_info_t *info) 809 + static int bluecard_close(struct bluecard_info *info) 811 810 { 812 811 unsigned int iobase = info->p_dev->resource[0]->start; 813 812 struct hci_dev *hdev = info->hdev; ··· 834 833 835 834 static int bluecard_probe(struct pcmcia_device *link) 836 835 { 837 - bluecard_info_t *info; 836 + struct bluecard_info *info; 838 837 839 838 /* Create new info device */ 840 839 info = devm_kzalloc(&link->dev, sizeof(*info), GFP_KERNEL); ··· 858 857 859 858 static int bluecard_config(struct pcmcia_device *link) 860 859 { 861 - bluecard_info_t *info = link->priv; 860 + struct bluecard_info *info = link->priv; 862 861 int i, n; 863 862 864 863 link->config_index = 0x20; ··· 898 897 899 898 static void bluecard_release(struct pcmcia_device *link) 900 899 { 901 - bluecard_info_t *info = link->priv; 900 + struct bluecard_info *info = link->priv; 902 901 903 902 bluecard_close(info); 904 903