Commit 3bbaf812 authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Marcel Holtmann

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: default avatarHimangi Saraogi <himangi774@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 66f4e0e4
...@@ -67,7 +67,7 @@ MODULE_FIRMWARE("BT3CPCC.bin"); ...@@ -67,7 +67,7 @@ MODULE_FIRMWARE("BT3CPCC.bin");
/* ======================== Local structures ======================== */ /* ======================== Local structures ======================== */
typedef struct bt3c_info_t { struct bt3c_info {
struct pcmcia_device *p_dev; struct pcmcia_device *p_dev;
struct hci_dev *hdev; struct hci_dev *hdev;
...@@ -80,7 +80,7 @@ typedef struct bt3c_info_t { ...@@ -80,7 +80,7 @@ typedef struct bt3c_info_t {
unsigned long rx_state; unsigned long rx_state;
unsigned long rx_count; unsigned long rx_count;
struct sk_buff *rx_skb; struct sk_buff *rx_skb;
} bt3c_info_t; };
static int bt3c_config(struct pcmcia_device *link); static 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,7 +175,7 @@ static int bt3c_write(unsigned int iobase, int fifo_size, __u8 *buf, int len)
} }
static void bt3c_write_wakeup(bt3c_info_t *info) static void bt3c_write_wakeup(struct bt3c_info *info)
{ {
if (!info) { if (!info) {
BT_ERR("Unknown device"); BT_ERR("Unknown device");
...@@ -214,7 +214,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info) ...@@ -214,7 +214,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info)
} }
static void bt3c_receive(bt3c_info_t *info) static void bt3c_receive(struct bt3c_info *info)
{ {
unsigned int iobase; unsigned int iobase;
int size = 0, avail; int size = 0, avail;
...@@ -336,7 +336,7 @@ static void bt3c_receive(bt3c_info_t *info) ...@@ -336,7 +336,7 @@ static void bt3c_receive(bt3c_info_t *info)
static irqreturn_t bt3c_interrupt(int irq, void *dev_inst) static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
{ {
bt3c_info_t *info = dev_inst; struct bt3c_info *info = dev_inst;
unsigned int iobase; unsigned int iobase;
int iir; int iir;
irqreturn_t r = IRQ_NONE; irqreturn_t r = IRQ_NONE;
...@@ -388,7 +388,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst) ...@@ -388,7 +388,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
static int bt3c_hci_flush(struct hci_dev *hdev) static int bt3c_hci_flush(struct hci_dev *hdev)
{ {
bt3c_info_t *info = hci_get_drvdata(hdev); struct bt3c_info *info = hci_get_drvdata(hdev);
/* Drop TX queue */ /* Drop TX queue */
skb_queue_purge(&(info->txq)); skb_queue_purge(&(info->txq));
...@@ -418,7 +418,7 @@ static int bt3c_hci_close(struct hci_dev *hdev) ...@@ -418,7 +418,7 @@ static int bt3c_hci_close(struct hci_dev *hdev)
static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb) static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{ {
bt3c_info_t *info = hci_get_drvdata(hdev); struct bt3c_info *info = hci_get_drvdata(hdev);
unsigned long flags; unsigned long flags;
switch (bt_cb(skb)->pkt_type) { 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,7 +451,8 @@ static int bt3c_hci_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
/* ======================== Card services HCI interaction ======================== */ /* ======================== Card services HCI interaction ======================== */
static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware, static int bt3c_load_firmware(struct bt3c_info *info,
const unsigned char *firmware,
int count) int count)
{ {
char *ptr = (char *) firmware; char *ptr = (char *) firmware;
...@@ -536,7 +537,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware, ...@@ -536,7 +537,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,
} }
static int bt3c_open(bt3c_info_t *info) static int bt3c_open(struct bt3c_info *info)
{ {
const struct firmware *firmware; const struct firmware *firmware;
struct hci_dev *hdev; struct hci_dev *hdev;
...@@ -603,7 +604,7 @@ static int bt3c_open(bt3c_info_t *info) ...@@ -603,7 +604,7 @@ static int bt3c_open(bt3c_info_t *info)
} }
static int bt3c_close(bt3c_info_t *info) static int bt3c_close(struct bt3c_info *info)
{ {
struct hci_dev *hdev = info->hdev; struct hci_dev *hdev = info->hdev;
...@@ -620,7 +621,7 @@ static int bt3c_close(bt3c_info_t *info) ...@@ -620,7 +621,7 @@ static int bt3c_close(bt3c_info_t *info)
static int bt3c_probe(struct pcmcia_device *link) static int bt3c_probe(struct pcmcia_device *link)
{ {
bt3c_info_t *info; struct bt3c_info *info;
/* Create new info device */ /* Create new info device */
info = devm_kzalloc(&link->dev, sizeof(*info), GFP_KERNEL); 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,7 +684,7 @@ static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev,
static int bt3c_config(struct pcmcia_device *link) static int bt3c_config(struct pcmcia_device *link)
{ {
bt3c_info_t *info = link->priv; struct bt3c_info *info = link->priv;
int i; int i;
unsigned long try; unsigned long try;
...@@ -724,7 +725,7 @@ static int bt3c_config(struct pcmcia_device *link) ...@@ -724,7 +725,7 @@ static int bt3c_config(struct pcmcia_device *link)
static void bt3c_release(struct pcmcia_device *link) static void bt3c_release(struct pcmcia_device *link)
{ {
bt3c_info_t *info = link->priv; struct bt3c_info *info = link->priv;
bt3c_close(info); bt3c_close(info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment