Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Lee Jones
c0056bfe 10cffde4

+4 -4
+4 -4
drivers/mfd/at91-usart.c
··· 27 27 28 28 static int at91_usart_mode_probe(struct platform_device *pdev) 29 29 { 30 - struct mfd_cell cell; 30 + const struct mfd_cell *cell; 31 31 u32 opmode = AT91_USART_MODE_SERIAL; 32 32 33 33 device_property_read_u32(&pdev->dev, "atmel,usart-mode", &opmode); 34 34 35 35 switch (opmode) { 36 36 case AT91_USART_MODE_SPI: 37 - cell = at91_usart_spi_subdev; 37 + cell = &at91_usart_spi_subdev; 38 38 break; 39 39 case AT91_USART_MODE_SERIAL: 40 - cell = at91_usart_serial_subdev; 40 + cell = &at91_usart_serial_subdev; 41 41 break; 42 42 default: 43 43 dev_err(&pdev->dev, "atmel,usart-mode has an invalid value %u\n", ··· 45 45 return -EINVAL; 46 46 } 47 47 48 - return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, &cell, 1, 48 + return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, cell, 1, 49 49 NULL, 0, NULL); 50 50 } 51 51