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)
commitcdc4c698e4be256634e722494dac0fa40e4137e2
treed3450f5b3b2379344db4a8b89bc13d30553978ff
parent22d63be91c5016207d0de25ed279707865f07e4f
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