summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2019-01-31 05:32:13 +0100
committerLee Jones <lee.jones@linaro.org>2019-02-07 11:44:09 +0100
commitc0056bfe48ab8dfe383c56bc75d1f03260dc9b2a (patch)
treec35d67c85bd452a1f2e80579dfbd4e96fefe4e34 /drivers/mfd
parentmfd: at91-usart: Constify at91_usart_spi_subdev and at91_usart_serial_subdev (diff)
downloadlinux-c0056bfe48ab8dfe383c56bc75d1f03260dc9b2a.tar.xz
linux-c0056bfe48ab8dfe383c56bc75d1f03260dc9b2a.zip
mfd: at91-usart: No need to copy mfd_cell in probe
Use pointer instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/at91-usart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/at91-usart.c b/drivers/mfd/at91-usart.c
index 684d3a8db661..6a8351a4588e 100644
--- a/drivers/mfd/at91-usart.c
+++ b/drivers/mfd/at91-usart.c
@@ -27,17 +27,17 @@ static const struct mfd_cell at91_usart_serial_subdev = {
static int at91_usart_mode_probe(struct platform_device *pdev)
{
- struct mfd_cell cell;
+ const struct mfd_cell *cell;
u32 opmode = AT91_USART_MODE_SERIAL;
device_property_read_u32(&pdev->dev, "atmel,usart-mode", &opmode);
switch (opmode) {
case AT91_USART_MODE_SPI:
- cell = at91_usart_spi_subdev;
+ cell = &at91_usart_spi_subdev;
break;
case AT91_USART_MODE_SERIAL:
- cell = at91_usart_serial_subdev;
+ cell = &at91_usart_serial_subdev;
break;
default:
dev_err(&pdev->dev, "atmel,usart-mode has an invalid value %u\n",
@@ -45,7 +45,7 @@ static int at91_usart_mode_probe(struct platform_device *pdev)
return -EINVAL;
}
- return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, &cell, 1,
+ return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, cell, 1,
NULL, 0, NULL);
}