summaryrefslogtreecommitdiff
path: root/drivers/net/can/c_can/c_can_pci.c
diff options
context:
space:
mode:
authorDario Binacchi <dariobin@libero.it>2021-03-03 00:54:34 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2021-03-30 12:14:53 +0300
commit13831ce69c775fb8186275fdeb91fa6daff2196c (patch)
tree151d03a2425c831b73971e326718e22e1936c1b6 /drivers/net/can/c_can/c_can_pci.c
parentfcbded019855136a3d99d74ef8b44e8f87120fb2 (diff)
downloadlinux-13831ce69c775fb8186275fdeb91fa6daff2196c.tar.xz
can: c_can: prepare to up the message objects number
As pointed by commit c0a9f4d396c9 ("can: c_can: Reduce register access") the "driver casts the 16 message objects in stone, which is completely braindead as contemporary hardware has up to 128 message objects". The patch prepares the module to extend the number of message objects beyond the 32 currently managed. This was achieved by transforming the constants used to manage RX/TX messages into variables without changing the driver policy. Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20210302215435.18286-6-dariobin@libero.it Signed-off-by: Dario Binacchi <dariobin@libero.it> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/c_can/c_can_pci.c')
-rw-r--r--drivers/net/can/c_can/c_can_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c
index 9a8d5e8eb645..fa419e795498 100644
--- a/drivers/net/can/c_can/c_can_pci.c
+++ b/drivers/net/can/c_can/c_can_pci.c
@@ -147,7 +147,7 @@ static int c_can_pci_probe(struct pci_dev *pdev,
}
/* allocate the c_can device */
- dev = alloc_c_can_dev();
+ dev = alloc_c_can_dev(C_CAN_NO_OF_OBJECTS);
if (!dev) {
ret = -ENOMEM;
goto out_iounmap;