]> git.baikalelectronics.ru Git - kernel.git/commit
can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap
authorSu Yanjun <suyanjun218@gmail.com>
Fri, 22 Jan 2021 08:13:34 +0000 (16:13 +0800)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 27 Jan 2021 09:01:46 +0000 (10:01 +0100)
commit6a07522c01e9a1d219fe141c8a197ad2f38f5cc7
treed3450f5b3b2379344db4a8b89bc13d30553978ff
parentcbb8aad2ef036f2e71b15f1d40b192d8dc62cbd8
can: mcp251xfd: replace sizeof(u32) with val_bytes in regmap

The sizeof(u32) is hardcoded. It's better to use the config value from the
regmap.

It increases the size of target object, but it's flexible when new mcp chip
need other val_bytes.

Link: https://lore.kernel.org/r/20210122081334.213957-1-suyanjun218@gmail.com
Signed-off-by: Su Yanjun <suyanjun218@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c