OSDN Git Service

fpga: lattice-sysconfig-spi: Add explicit include for of.h
authorRob Herring <robh@kernel.org>
Wed, 5 Apr 2023 20:27:23 +0000 (15:27 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 6 Apr 2023 18:36:27 +0000 (20:36 +0200)
With linux/acpi.h (in spi/spi.h) no longer implicitly including of.h,
add an explicit include of of.h to fix the following errors:

drivers/fpga/lattice-sysconfig-spi.c:146:35: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/fpga/lattice-sysconfig-spi.c

index 2702b26..44691cf 100644 (file)
@@ -3,6 +3,7 @@
  * Lattice FPGA programming over slave SPI sysCONFIG interface.
  */
 
+#include <linux/of.h>
 #include <linux/spi/spi.h>
 
 #include "lattice-sysconfig.h"