diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2014-03-31 18:34:03 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-04-21 18:37:29 -0400 |
commit | c5b0c370fcbb6410bc59fcf07847acf938cbc6b4 (patch) | |
tree | d2f65ed03421d71fb1ff07df581af8721dea49f2 /drivers/nfc | |
parent | e8efab6e6bad1bb116bb9dfa6e0f65dd1bb9cc0e (diff) |
NFC: st21nfca: Remove sporadic wait_tab variable from functions.
wait_tab variable is already global and may create conflicts.
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/st21nfca/i2c.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c index 3b0fd0f76d1c..71becd9cb99d 100644 --- a/drivers/nfc/st21nfca/i2c.c +++ b/drivers/nfc/st21nfca/i2c.c | |||
@@ -100,17 +100,17 @@ do { \ | |||
100 | 100 | ||
101 | static void st21nfca_hci_platform_init(struct st21nfca_i2c_phy *phy) | 101 | static void st21nfca_hci_platform_init(struct st21nfca_i2c_phy *phy) |
102 | { | 102 | { |
103 | u16 wait_tab[] = { 50, 300, 1000 }; | 103 | u16 wait_reboot[] = { 50, 300, 1000 }; |
104 | char reboot_cmd[] = { 0x7E, 0x66, 0x48, 0xF6, 0x7E }; | 104 | char reboot_cmd[] = { 0x7E, 0x66, 0x48, 0xF6, 0x7E }; |
105 | u8 tmp[ST21NFCA_HCI_LLC_MAX_SIZE]; | 105 | u8 tmp[ST21NFCA_HCI_LLC_MAX_SIZE]; |
106 | int i, r = -1; | 106 | int i, r = -1; |
107 | 107 | ||
108 | for (i = 0; i < ARRAY_SIZE(wait_tab) && r < 0; i++) | 108 | for (i = 0; i < ARRAY_SIZE(wait_reboot) && r < 0; i++) |
109 | r = i2c_master_recv(phy->i2c_dev, tmp, | 109 | r = i2c_master_recv(phy->i2c_dev, tmp, |
110 | ST21NFCA_HCI_LLC_MAX_SIZE); | 110 | ST21NFCA_HCI_LLC_MAX_SIZE); |
111 | 111 | ||
112 | r = -1; | 112 | r = -1; |
113 | for (i = 0; i < ARRAY_SIZE(wait_tab) && r < 0; i++) | 113 | for (i = 0; i < ARRAY_SIZE(wait_reboot) && r < 0; i++) |
114 | r = i2c_master_send(phy->i2c_dev, reboot_cmd, | 114 | r = i2c_master_send(phy->i2c_dev, reboot_cmd, |
115 | sizeof(reboot_cmd)); | 115 | sizeof(reboot_cmd)); |
116 | usleep_range(1000, 1500); | 116 | usleep_range(1000, 1500); |
@@ -176,7 +176,6 @@ static int st21nfca_hci_i2c_write(void *phy_id, struct sk_buff *skb) | |||
176 | int r = -1, i, j, len; | 176 | int r = -1, i, j, len; |
177 | struct st21nfca_i2c_phy *phy = phy_id; | 177 | struct st21nfca_i2c_phy *phy = phy_id; |
178 | struct i2c_client *client = phy->i2c_dev; | 178 | struct i2c_client *client = phy->i2c_dev; |
179 | u16 wait_tab[] = { 2, 3, 5, 15, 20, 40}; | ||
180 | u8 tmp[ST21NFCA_HCI_LLC_MAX_SIZE * 2]; | 179 | u8 tmp[ST21NFCA_HCI_LLC_MAX_SIZE * 2]; |
181 | 180 | ||
182 | I2C_DUMP_SKB("st21nfca_hci_i2c_write", skb); | 181 | I2C_DUMP_SKB("st21nfca_hci_i2c_write", skb); |