.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* ------------------------------------------------------------------------- |
---|
2 | 3 | * Copyright (C) 2014-2016, Intel Corporation |
---|
3 | 4 | * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License as published by |
---|
6 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
7 | | - * (at your option) any later version. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | 5 | * ------------------------------------------------------------------------- |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
.. | .. |
---|
57 | 49 | { |
---|
58 | 50 | struct fdp_i2c_phy *phy = phy_id; |
---|
59 | 51 | |
---|
60 | | - dev_dbg(&phy->i2c_dev->dev, "%s\n", __func__); |
---|
61 | 52 | fdp_nci_i2c_reset(phy); |
---|
62 | 53 | |
---|
63 | 54 | return 0; |
---|
.. | .. |
---|
67 | 58 | { |
---|
68 | 59 | struct fdp_i2c_phy *phy = phy_id; |
---|
69 | 60 | |
---|
70 | | - dev_dbg(&phy->i2c_dev->dev, "%s\n", __func__); |
---|
71 | 61 | fdp_nci_i2c_reset(phy); |
---|
72 | 62 | } |
---|
73 | 63 | |
---|
.. | .. |
---|
205 | 195 | static irqreturn_t fdp_nci_i2c_irq_thread_fn(int irq, void *phy_id) |
---|
206 | 196 | { |
---|
207 | 197 | struct fdp_i2c_phy *phy = phy_id; |
---|
208 | | - struct i2c_client *client; |
---|
209 | 198 | struct sk_buff *skb; |
---|
210 | 199 | int r; |
---|
211 | 200 | |
---|
.. | .. |
---|
213 | 202 | WARN_ON_ONCE(1); |
---|
214 | 203 | return IRQ_NONE; |
---|
215 | 204 | } |
---|
216 | | - |
---|
217 | | - client = phy->i2c_dev; |
---|
218 | | - dev_dbg(&client->dev, "%s\n", __func__); |
---|
219 | 205 | |
---|
220 | 206 | r = fdp_nci_i2c_read(phy, &skb); |
---|
221 | 207 | |
---|
.. | .. |
---|
225 | 211 | return IRQ_HANDLED; |
---|
226 | 212 | |
---|
227 | 213 | if (skb != NULL) |
---|
228 | | - fdp_nci_recv_frame(phy->ndev, skb); |
---|
| 214 | + nci_recv_frame(phy->ndev, skb); |
---|
229 | 215 | |
---|
230 | 216 | return IRQ_HANDLED; |
---|
231 | 217 | } |
---|
.. | .. |
---|
263 | 249 | len, sizeof(**fw_vsc_cfg), |
---|
264 | 250 | GFP_KERNEL); |
---|
265 | 251 | |
---|
| 252 | + if (!*fw_vsc_cfg) |
---|
| 253 | + goto alloc_err; |
---|
| 254 | + |
---|
266 | 255 | r = device_property_read_u8_array(dev, FDP_DP_FW_VSC_CFG_NAME, |
---|
267 | 256 | *fw_vsc_cfg, len); |
---|
268 | 257 | |
---|
.. | .. |
---|
276 | 265 | *fw_vsc_cfg = NULL; |
---|
277 | 266 | } |
---|
278 | 267 | |
---|
| 268 | +alloc_err: |
---|
279 | 269 | dev_dbg(dev, "Clock type: %d, clock frequency: %d, VSC: %s", |
---|
280 | 270 | *clock_type, *clock_freq, *fw_vsc_cfg != NULL ? "yes" : "no"); |
---|
281 | 271 | } |
---|
.. | .. |
---|
295 | 285 | u8 clock_type; |
---|
296 | 286 | u32 clock_freq; |
---|
297 | 287 | int r = 0; |
---|
298 | | - |
---|
299 | | - dev_dbg(dev, "%s\n", __func__); |
---|
300 | 288 | |
---|
301 | 289 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { |
---|
302 | 290 | nfc_err(dev, "No I2C_FUNC_I2C support\n"); |
---|
.. | .. |
---|
358 | 346 | static int fdp_nci_i2c_remove(struct i2c_client *client) |
---|
359 | 347 | { |
---|
360 | 348 | struct fdp_i2c_phy *phy = i2c_get_clientdata(client); |
---|
361 | | - |
---|
362 | | - dev_dbg(&client->dev, "%s\n", __func__); |
---|
363 | 349 | |
---|
364 | 350 | fdp_nci_remove(phy->ndev); |
---|
365 | 351 | fdp_nci_i2c_disable(phy); |
---|