2023-12-08 18:59:47

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH -next] spi: mpc52xx: explicitly include linux/platform_device.h

Since linux/of_platform.h had included linux/platform_device.h
and since that inclusion was removed, this driver now needs to include
the latter header file explicitly to prevent build errors:

drivers/spi/spi-mpc52xx.c: In function 'mpc52xx_spi_probe':
drivers/spi/spi-mpc52xx.c:396:20: error: invalid use of undefined type 'struct platform_device'

and more like that.

Fixes: 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h")
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: [email protected]
---
drivers/spi/spi-mpc52xx.c | 1 +
1 file changed, 1 insertion(+)

diff -- a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c
--- a/drivers/spi/spi-mpc52xx.c
+++ b/drivers/spi/spi-mpc52xx.c
@@ -22,6 +22,7 @@
#include <linux/slab.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
+#include <linux/platform_device.h>

#include <asm/time.h>
#include <asm/mpc52xx.h>


2023-12-09 12:31:07

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH -next] spi: mpc52xx: explicitly include linux/platform_device.h

On Fri, 08 Dec 2023 10:59:27 -0800, Randy Dunlap wrote:
> Since linux/of_platform.h had included linux/platform_device.h
> and since that inclusion was removed, this driver now needs to include
> the latter header file explicitly to prevent build errors:
>
> drivers/spi/spi-mpc52xx.c: In function 'mpc52xx_spi_probe':
> drivers/spi/spi-mpc52xx.c:396:20: error: invalid use of undefined type 'struct platform_device'
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: mpc52xx: explicitly include linux/platform_device.h
commit: 52c9a884c6388171f4c6cdafd9add042a7abec53

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark