Skip to content

Commit 833e24a

Browse files
committed
Merge tag 'linux-can-next-for-6.5-20230515' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
Marc Kleine-Budde says: ==================== pull-request: can-next 2023-05-15 The 1st patch is by Ji-Ze Hong and adds support for the Fintek F81604 USB-CAN adapter. Jiapeng Chong's patch removes unnecessary dev_err() functions from the bxcan driver. The next patch is by me an makes a CAN internal header file self contained. The remaining 19 patches are by Uwe Kleine-König, they all convert the platform driver remove callback to return void. * tag 'linux-can-next-for-6.5-20230515' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (22 commits) can: xilinx: Convert to platform remove callback returning void can: ti_hecc: Convert to platform remove callback returning void can: sun4i_can: Convert to platform remove callback returning void can: softing: Convert to platform remove callback returning void can: sja1000_platform: Convert to platform remove callback returning void can: sja1000_isa: Convert to platform remove callback returning void can: rcar: Convert to platform remove callback returning void can: mscan: mpc5xxx_can: Convert to platform remove callback returning void can: m_can: Convert to platform remove callback returning void can: janz-ican3: Convert to platform remove callback returning void can: ifi_canfd: Convert to platform remove callback returning void can: grcan: Convert to platform remove callback returning void can: flexcan: Convert to platform remove callback returning void can: ctucanfd: Convert to platform remove callback returning void can: length: make header self contained can: cc770_platform: Convert to platform remove callback returning void can: bxcan: Remove unnecessary print function dev_err() can: cc770_isa: Convert to platform remove callback returning void can: usb: f81604: add Fintek F81604 support can: c_can: Convert to platform remove callback returning void ... ==================== Link: https://lore.kernel.org/r/20230515205759.1003118-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents e7480a4 + 2a3e163 commit 833e24a

File tree

25 files changed

+1266
-86
lines changed

25 files changed

+1266
-86
lines changed

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7966,6 +7966,12 @@ S: Maintained
79667966
F: drivers/hwmon/f75375s.c
79677967
F: include/linux/f75375s.h
79687968

7969+
FINTEK F81604 USB to 2xCANBUS DEVICE DRIVER
7970+
M: Ji-Ze Hong (Peter Hong) <peter_hong@fintek.com.tw>
7971+
L: linux-can@vger.kernel.org
7972+
S: Maintained
7973+
F: drivers/net/can/usb/f81604.c
7974+
79697975
FIREWIRE AUDIO DRIVERS and IEC 61883-1/6 PACKET STREAMING ENGINE
79707976
M: Clemens Ladisch <clemens@ladisch.de>
79717977
M: Takashi Sakamoto <o-takashi@sakamocchi.jp>

drivers/net/can/at91_can.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ static int at91_can_probe(struct platform_device *pdev)
13461346
return err;
13471347
}
13481348

1349-
static int at91_can_remove(struct platform_device *pdev)
1349+
static void at91_can_remove(struct platform_device *pdev)
13501350
{
13511351
struct net_device *dev = platform_get_drvdata(pdev);
13521352
struct at91_priv *priv = netdev_priv(dev);
@@ -1362,8 +1362,6 @@ static int at91_can_remove(struct platform_device *pdev)
13621362
clk_put(priv->clk);
13631363

13641364
free_candev(dev);
1365-
1366-
return 0;
13671365
}
13681366

13691367
static const struct platform_device_id at91_can_id_table[] = {
@@ -1381,7 +1379,7 @@ MODULE_DEVICE_TABLE(platform, at91_can_id_table);
13811379

13821380
static struct platform_driver at91_can_driver = {
13831381
.probe = at91_can_probe,
1384-
.remove = at91_can_remove,
1382+
.remove_new = at91_can_remove,
13851383
.driver = {
13861384
.name = KBUILD_MODNAME,
13871385
.of_match_table = of_match_ptr(at91_can_dt_ids),

drivers/net/can/bxcan.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -954,22 +954,16 @@ static int bxcan_probe(struct platform_device *pdev)
954954
}
955955

956956
rx_irq = platform_get_irq_byname(pdev, "rx0");
957-
if (rx_irq < 0) {
958-
dev_err(dev, "failed to get rx0 irq\n");
957+
if (rx_irq < 0)
959958
return rx_irq;
960-
}
961959

962960
tx_irq = platform_get_irq_byname(pdev, "tx");
963-
if (tx_irq < 0) {
964-
dev_err(dev, "failed to get tx irq\n");
961+
if (tx_irq < 0)
965962
return tx_irq;
966-
}
967963

968964
sce_irq = platform_get_irq_byname(pdev, "sce");
969-
if (sce_irq < 0) {
970-
dev_err(dev, "failed to get sce irq\n");
965+
if (sce_irq < 0)
971966
return sce_irq;
972-
}
973967

974968
ndev = alloc_candev(sizeof(struct bxcan_priv), BXCAN_TX_MB_NUM);
975969
if (!ndev) {
@@ -1027,7 +1021,7 @@ static int bxcan_probe(struct platform_device *pdev)
10271021
return err;
10281022
}
10291023

1030-
static int bxcan_remove(struct platform_device *pdev)
1024+
static void bxcan_remove(struct platform_device *pdev)
10311025
{
10321026
struct net_device *ndev = platform_get_drvdata(pdev);
10331027
struct bxcan_priv *priv = netdev_priv(ndev);
@@ -1036,7 +1030,6 @@ static int bxcan_remove(struct platform_device *pdev)
10361030
clk_disable_unprepare(priv->clk);
10371031
can_rx_offload_del(&priv->offload);
10381032
free_candev(ndev);
1039-
return 0;
10401033
}
10411034

10421035
static int __maybe_unused bxcan_suspend(struct device *dev)
@@ -1088,7 +1081,7 @@ static struct platform_driver bxcan_driver = {
10881081
.of_match_table = bxcan_of_match,
10891082
},
10901083
.probe = bxcan_probe,
1091-
.remove = bxcan_remove,
1084+
.remove_new = bxcan_remove,
10921085
};
10931086

10941087
module_platform_driver(bxcan_driver);

drivers/net/can/c_can/c_can_platform.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,16 +410,14 @@ static int c_can_plat_probe(struct platform_device *pdev)
410410
return ret;
411411
}
412412

413-
static int c_can_plat_remove(struct platform_device *pdev)
413+
static void c_can_plat_remove(struct platform_device *pdev)
414414
{
415415
struct net_device *dev = platform_get_drvdata(pdev);
416416
struct c_can_priv *priv = netdev_priv(dev);
417417

418418
unregister_c_can_dev(dev);
419419
pm_runtime_disable(priv->device);
420420
free_c_can_dev(dev);
421-
422-
return 0;
423421
}
424422

425423
#ifdef CONFIG_PM
@@ -487,7 +485,7 @@ static struct platform_driver c_can_plat_driver = {
487485
.of_match_table = c_can_of_table,
488486
},
489487
.probe = c_can_plat_probe,
490-
.remove = c_can_plat_remove,
488+
.remove_new = c_can_plat_remove,
491489
.suspend = c_can_suspend,
492490
.resume = c_can_resume,
493491
.id_table = c_can_id_table,

drivers/net/can/cc770/cc770_isa.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static int cc770_isa_probe(struct platform_device *pdev)
285285
return err;
286286
}
287287

288-
static int cc770_isa_remove(struct platform_device *pdev)
288+
static void cc770_isa_remove(struct platform_device *pdev)
289289
{
290290
struct net_device *dev = platform_get_drvdata(pdev);
291291
struct cc770_priv *priv = netdev_priv(dev);
@@ -303,13 +303,11 @@ static int cc770_isa_remove(struct platform_device *pdev)
303303
release_region(port[idx], CC770_IOSIZE);
304304
}
305305
free_cc770dev(dev);
306-
307-
return 0;
308306
}
309307

310308
static struct platform_driver cc770_isa_driver = {
311309
.probe = cc770_isa_probe,
312-
.remove = cc770_isa_remove,
310+
.remove_new = cc770_isa_remove,
313311
.driver = {
314312
.name = KBUILD_MODNAME,
315313
},

drivers/net/can/cc770/cc770_platform.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static int cc770_platform_probe(struct platform_device *pdev)
230230
return err;
231231
}
232232

233-
static int cc770_platform_remove(struct platform_device *pdev)
233+
static void cc770_platform_remove(struct platform_device *pdev)
234234
{
235235
struct net_device *dev = platform_get_drvdata(pdev);
236236
struct cc770_priv *priv = netdev_priv(dev);
@@ -242,8 +242,6 @@ static int cc770_platform_remove(struct platform_device *pdev)
242242

243243
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
244244
release_mem_region(mem->start, resource_size(mem));
245-
246-
return 0;
247245
}
248246

249247
static const struct of_device_id cc770_platform_table[] = {
@@ -259,7 +257,7 @@ static struct platform_driver cc770_platform_driver = {
259257
.of_match_table = cc770_platform_table,
260258
},
261259
.probe = cc770_platform_probe,
262-
.remove = cc770_platform_remove,
260+
.remove_new = cc770_platform_remove,
263261
};
264262

265263
module_platform_driver(cc770_platform_driver);

drivers/net/can/ctucanfd/ctucanfd_platform.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int ctucan_platform_probe(struct platform_device *pdev)
8686
* This function frees all the resources allocated to the device.
8787
* Return: 0 always
8888
*/
89-
static int ctucan_platform_remove(struct platform_device *pdev)
89+
static void ctucan_platform_remove(struct platform_device *pdev)
9090
{
9191
struct net_device *ndev = platform_get_drvdata(pdev);
9292
struct ctucan_priv *priv = netdev_priv(ndev);
@@ -97,8 +97,6 @@ static int ctucan_platform_remove(struct platform_device *pdev)
9797
pm_runtime_disable(&pdev->dev);
9898
netif_napi_del(&priv->napi);
9999
free_candev(ndev);
100-
101-
return 0;
102100
}
103101

104102
static SIMPLE_DEV_PM_OPS(ctucan_platform_pm_ops, ctucan_suspend, ctucan_resume);
@@ -113,7 +111,7 @@ MODULE_DEVICE_TABLE(of, ctucan_of_match);
113111

114112
static struct platform_driver ctucanfd_driver = {
115113
.probe = ctucan_platform_probe,
116-
.remove = ctucan_platform_remove,
114+
.remove_new = ctucan_platform_remove,
117115
.driver = {
118116
.name = DRV_NAME,
119117
.pm = &ctucan_platform_pm_ops,

drivers/net/can/flexcan/flexcan-core.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ static int flexcan_probe(struct platform_device *pdev)
22182218
return err;
22192219
}
22202220

2221-
static int flexcan_remove(struct platform_device *pdev)
2221+
static void flexcan_remove(struct platform_device *pdev)
22222222
{
22232223
struct net_device *dev = platform_get_drvdata(pdev);
22242224

@@ -2227,8 +2227,6 @@ static int flexcan_remove(struct platform_device *pdev)
22272227
unregister_flexcandev(dev);
22282228
pm_runtime_disable(&pdev->dev);
22292229
free_candev(dev);
2230-
2231-
return 0;
22322230
}
22332231

22342232
static int __maybe_unused flexcan_suspend(struct device *device)
@@ -2379,7 +2377,7 @@ static struct platform_driver flexcan_driver = {
23792377
.of_match_table = flexcan_of_match,
23802378
},
23812379
.probe = flexcan_probe,
2382-
.remove = flexcan_remove,
2380+
.remove_new = flexcan_remove,
23832381
.id_table = flexcan_id_table,
23842382
};
23852383

drivers/net/can/grcan.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ static int grcan_probe(struct platform_device *ofdev)
16961696
return err;
16971697
}
16981698

1699-
static int grcan_remove(struct platform_device *ofdev)
1699+
static void grcan_remove(struct platform_device *ofdev)
17001700
{
17011701
struct net_device *dev = platform_get_drvdata(ofdev);
17021702
struct grcan_priv *priv = netdev_priv(dev);
@@ -1706,8 +1706,6 @@ static int grcan_remove(struct platform_device *ofdev)
17061706
irq_dispose_mapping(dev->irq);
17071707
netif_napi_del(&priv->napi);
17081708
free_candev(dev);
1709-
1710-
return 0;
17111709
}
17121710

17131711
static const struct of_device_id grcan_match[] = {
@@ -1726,7 +1724,7 @@ static struct platform_driver grcan_driver = {
17261724
.of_match_table = grcan_match,
17271725
},
17281726
.probe = grcan_probe,
1729-
.remove = grcan_remove,
1727+
.remove_new = grcan_remove,
17301728
};
17311729

17321730
module_platform_driver(grcan_driver);

drivers/net/can/ifi_canfd/ifi_canfd.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,15 +1013,13 @@ static int ifi_canfd_plat_probe(struct platform_device *pdev)
10131013
return ret;
10141014
}
10151015

1016-
static int ifi_canfd_plat_remove(struct platform_device *pdev)
1016+
static void ifi_canfd_plat_remove(struct platform_device *pdev)
10171017
{
10181018
struct net_device *ndev = platform_get_drvdata(pdev);
10191019

10201020
unregister_candev(ndev);
10211021
platform_set_drvdata(pdev, NULL);
10221022
free_candev(ndev);
1023-
1024-
return 0;
10251023
}
10261024

10271025
static const struct of_device_id ifi_canfd_of_table[] = {
@@ -1036,7 +1034,7 @@ static struct platform_driver ifi_canfd_plat_driver = {
10361034
.of_match_table = ifi_canfd_of_table,
10371035
},
10381036
.probe = ifi_canfd_plat_probe,
1039-
.remove = ifi_canfd_plat_remove,
1037+
.remove_new = ifi_canfd_plat_remove,
10401038
};
10411039

10421040
module_platform_driver(ifi_canfd_plat_driver);

0 commit comments

Comments
 (0)