fb: Explicitly include correct DT includes
Subsystems (3)
PATCH 1/1 fb: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
--- drivers/video/fbdev/bw2.c | 3 ++- drivers/video/fbdev/cg14.c | 3 ++- drivers/video/fbdev/cg3.c | 3 ++- drivers/video/fbdev/cg6.c | 3 ++- drivers/video/fbdev/ffb.c | 3 ++- drivers/video/fbdev/grvga.c | 3 +-- drivers/video/fbdev/leo.c | 3 ++- drivers/video/fbdev/mb862xx/mb862xxfb_accel.c | 4 +--- drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 6 +++--- drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 2 +- drivers/video/fbdev/p9100.c | 3 ++- drivers/video/fbdev/platinumfb.c | 4 ++-- drivers/video/fbdev/sbuslib.c | 6 +++--- drivers/video/fbdev/sunxvr1000.c | 3 ++- drivers/video/fbdev/sunxvr2500.c | 2 +- drivers/video/fbdev/sunxvr500.c | 2 +- drivers/video/fbdev/tcx.c | 3 ++- drivers/video/fbdev/xilinxfb.c | 5 ++--- 18 files changed, 33 insertions(+), 28 deletions(-)
drivers/video/fbdev/bw2.c +2 -1
@@ -17,7 +17,8 @@#include <linux/init.h> #include <linux/fb.h> #include <linux/mm.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/fbio.h>
drivers/video/fbdev/cg14.c +2 -1
@@ -17,7 +17,8 @@#include <linux/fb.h> #include <linux/mm.h> #include <linux/uaccess.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/fbio.h>
drivers/video/fbdev/cg3.c +2 -1
@@ -17,7 +17,8 @@#include <linux/init.h> #include <linux/fb.h> #include <linux/mm.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/fbio.h>
drivers/video/fbdev/cg6.c +2 -1
@@ -17,7 +17,8 @@#include <linux/init.h> #include <linux/fb.h> #include <linux/mm.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/fbio.h>
drivers/video/fbdev/ffb.c +2 -1
@@ -16,7 +16,8 @@#include <linux/fb.h> #include <linux/mm.h> #include <linux/timer.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/upa.h>
drivers/video/fbdev/grvga.c +1 -2
@@ -12,8 +12,7 @@#include <linux/platform_device.h> #include <linux/dma-mapping.h> -#include <linux/of_platform.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/string.h>
drivers/video/fbdev/leo.c +2 -1
@@ -16,8 +16,9 @@#include <linux/init.h> #include <linux/fb.h> #include <linux/mm.h> -#include <linux/of_device.h> #include <linux/io.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/fbio.h>
drivers/video/fbdev/mb862xx/mb862xxfb_accel.c +1 -3
@@ -15,9 +15,7 @@#include <linux/module.h> #include <linux/pci.h> #include <linux/slab.h> -#if defined(CONFIG_OF ) -#include <linux/of_platform.h> -#endif +#include "mb862xxfb.h" #include "mb862xx_reg.h" #include "mb862xxfb_accel.h"
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c +3 -3
@@ -18,11 +18,11 @@#include <linux/init.h> #include <linux/interrupt.h> #include <linux/pci.h> -#if defined(CONFIG_OF ) +#include <linux/of.h> #include <linux/of_address.h> #include <linux/of_irq.h> -#include <linux/of_platform.h> -#endif +#include <linux/platform_device.h> +#include "mb862xxfb.h" #include "mb862xx_reg.h"
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +1 -1
@@ -15,12 +15,12 @@#include <linux/gpio/consumer.h> #include <linux/interrupt.h> #include <linux/jiffies.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/sched/signal.h> #include <linux/slab.h> #include <linux/workqueue.h> -#include <linux/of_device.h> #include <video/omapfb_dss.h> #include <video/mipi_display.h>
drivers/video/fbdev/p9100.c +2 -1
@@ -15,7 +15,8 @@#include <linux/init.h> #include <linux/fb.h> #include <linux/mm.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/fbio.h>
drivers/video/fbdev/platinumfb.c +2 -2
@@ -30,9 +30,9 @@#include <linux/fb.h> #include <linux/init.h> #include <linux/nvram.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_device.h> -#include <linux/of_platform.h> +#include <linux/platform_device.h> #include "macmodes.h" #include "platinumfb.h"
drivers/video/fbdev/sbuslib.c +3 -3
@@ -11,7 +11,7 @@#include <linux/fb.h> #include <linux/mm.h> #include <linux/uaccess.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <asm/fbio.h>
@@ -48,7 +48,7 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,unsigned long map_offset =0 ;unsigned long off;int i; - +if (!(vma->vm_flags & (VM_SHARED |VM_MAYSHARE )))return -EINVAL ;
@@ -72,7 +72,7 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,#define POFF_MASK (PAGE_MASK|0x1UL)#else #define POFF_MASK (PAGE_MASK) -#endif +#endif map_offset = (physbase + map[i].poff) &POFF_MASK ;break ; }
drivers/video/fbdev/sunxvr1000.c +2 -1
@@ -8,7 +8,8 @@#include <linux/kernel.h> #include <linux/fb.h> #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> struct gfb_info {struct fb_info *info;
drivers/video/fbdev/sunxvr2500.c +1 -1
@@ -10,7 +10,7 @@#include <linux/fb.h> #include <linux/pci.h> #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <asm/io.h>
drivers/video/fbdev/sunxvr500.c +1 -1
@@ -10,7 +10,7 @@#include <linux/fb.h> #include <linux/pci.h> #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <asm/io.h>
drivers/video/fbdev/tcx.c +2 -1
@@ -17,7 +17,8 @@#include <linux/init.h> #include <linux/fb.h> #include <linux/mm.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/fbio.h>
drivers/video/fbdev/xilinxfb.c +2 -3
@@ -24,14 +24,13 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/errno.h> +#include <linux/platform_device.h> #include <linux/string.h> #include <linux/mm.h> #include <linux/fb.h> #include <linux/init.h> #include <linux/dma-mapping.h> -#include <linux/of_device.h> -#include <linux/of_platform.h> -#include <linux/of_address.h> +#include <linux/of.h> #include <linux/io.h> #include <linux/slab.h>
Signature · 1 line
2.40.1
Hi
Am 14.07.23 um 19:50 schrieb Rob Herring:
Quoted 10 lines
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.Signed-off-by Rob Herring <[email protected]>
[...]
drivers/video/fbdev/sbuslib.c int sbusfb_mmap_helper(struct sbus_mmap_map *map, · line 51
Quoted 7 lines
drivers/video/fbdev/sbuslib.c +1
-1@@ -48,7 +48,7 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,unsigned long map_offset =0 ;unsigned long off;int i; - +
The various whitespace fixes should rather go into a separate patch. You can add
to the whitespace fix and the include cleanup.
Best regards
Thomas
Quoted 87 lines
drivers/video/fbdev/sbuslib.c +1
-1if (!(vma->vm_flags & (VM_SHARED |VM_MAYSHARE )))return -EINVAL ;@@ -72,7 +72,7 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,#define POFF_MASK (PAGE_MASK|0x1UL)#else #define POFF_MASK (PAGE_MASK) -#endif +#endif map_offset = (physbase + map[i].poff) &POFF_MASK ;break ; }drivers/video/fbdev/sunxvr1000.c +2
-1@@ -8,7 +8,8 @@#include <linux/kernel.h> #include <linux/fb.h> #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> struct gfb_info {struct fb_info *info;drivers/video/fbdev/sunxvr2500.c +1
-1@@ -10,7 +10,7 @@#include <linux/fb.h> #include <linux/pci.h> #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <asm/io.h> drivers/video/fbdev/sunxvr500.c +1
-1@@ -10,7 +10,7 @@#include <linux/fb.h> #include <linux/pci.h> #include <linux/init.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <asm/io.h> drivers/video/fbdev/tcx.c +2
-1@@ -17,7 +17,8 @@#include <linux/init.h> #include <linux/fb.h> #include <linux/mm.h> -#include <linux/of_device.h> +#include <linux/of.h> +#include <linux/platform_device.h> #include <asm/io.h> #include <asm/fbio.h> drivers/video/fbdev/xilinxfb.c +2
-3@@ -24,14 +24,13 @@#include <linux/module.h> #include <linux/kernel.h> #include <linux/errno.h> +#include <linux/platform_device.h> #include <linux/string.h> #include <linux/mm.h> #include <linux/fb.h> #include <linux/init.h> #include <linux/dma-mapping.h> -#include <linux/of_device.h> -#include <linux/of_platform.h> -#include <linux/of_address.h> +#include <linux/of.h> #include <linux/io.h> #include <linux/slab.h>
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Quoted 26 lines · Thomas Zimmermann
Hi
Am 14.07.23 um 19:50 schrieb Rob Herring:
Quoted 10 lines
The DT
of_device.handof_platform.hdate back to the separateof_platform_bus_typebefore it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also includeplatform_device.handof.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.Signed-off-by Rob Herring <[email protected]>[...]
drivers/video/fbdev/sbuslib.c int sbusfb_mmap_helper(struct sbus_mmap_map *map, · line 51
Quoted 7 lines
drivers/video/fbdev/sbuslib.c +1
-1@@ -48,7 +48,7 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,unsigned long map_offset =0 ;unsigned long off;int i; - +The various whitespace fixes should rather go into a separate patch. You can add
Quoted 3 lines
Reviewed-by Thomas Zimmermann <[email protected]>to the whitespace fix and the include cleanup.
Indeed. I missed dropping the whitespace change.
Rob
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel