Skip to contentSkip to conversation

arch: sh: Include <linux/io.h> in dac.h

PATCH In review Thomas Zimmermann 3 participants 7 messages Oct 28, 2025 – Apr 13 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch: sh: Include <linux/io.h> in dac.h

Include <linux/io.h> to avoid depending on <linux/backlight.h> for including it. Declares __raw_readb() and __raw_writeb().

Fixes 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
Cc Thomas Zimmermann <[email protected]>
Cc Daniel Thompson (RISCstar) <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Lee Jones <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc Jingoo Han <[email protected]>

---
This is fallout from a recent cleanup of the backlight header file. I don't have the option of building or testing this change, though.

---
 arch/sh/include/cpu-sh3/cpu/dac.h | 2 ++
 1 file changed, 2 insertions(+)
arch/sh/include/cpu-sh3/cpu/dac.h +2 -0
index fd02331608a8..323ec8570bcd 100644
@@ -2,6 +2,8 @@
 #ifndef __ASM_CPU_SH3_DAC_H
 #define __ASM_CPU_SH3_DAC_H
 
+#include <linux/io.h>
+
 /*
  * Copyright (C) 2003  Andriy Skulysh
  */
Signature · 1 line
2.51.1
#1 lore raw

Hi Thomas,

Quoted 26 lines · Thomas Zimmermann

Include <linux/io.h> to avoid depending on <linux/backlight.h> for including it. Declares __raw_readb() and __raw_writeb().

Fixes 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
Cc Thomas Zimmermann <[email protected]>
Cc Daniel Thompson (RISCstar) <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Lee Jones <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc Jingoo Han <[email protected]>

---
This is fallout from a recent cleanup of the backlight header file. I don't have the option of building or testing this change, though.

---
 arch/sh/include/cpu-sh3/cpu/dac.h | 2 ++
 1 file changed, 2 insertions(+)
arch/sh/include/cpu-sh3/cpu/dac.h +0 -0
index fd02331608a8..323ec8570bcd 100644

arch/sh/include/cpu-sh3/cpu/dac.h line 9

Quoted 8 lines
arch/sh/include/cpu-sh3/cpu/dac.h +2 -0
@@ -2,6 +2,8 @@
 #ifndef __ASM_CPU_SH3_DAC_H
 #define __ASM_CPU_SH3_DAC_H
 
+#include <linux/io.h>
+
 /*
  * Copyright (C) 2003  Andriy Skulysh
  */

I'll perform a test build tomorrow. And I think I should be able to test it on my HP Jornada 680 which is based on a SH-3 CPU.

CC'ing Artur Rojek who's got the same model and previously worked on the SH-3 code.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Zimmermann
Quoted 14 lines · Thomas Zimmermann

Include <linux/io.h> to avoid depending on <linux/backlight.h> for including it. Declares __raw_readb() and __raw_writeb().

Fixes 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
Cc Thomas Zimmermann <[email protected]>
Cc Daniel Thompson (RISCstar) <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Lee Jones <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc Jingoo Han <[email protected]>

Daniel.

#3 lore raw
In reply to Thomas Zimmermann

Hi Thomas,

Quoted 26 lines · Thomas Zimmermann

Include <linux/io.h> to avoid depending on <linux/backlight.h> for including it. Declares __raw_readb() and __raw_writeb().

Fixes 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
Cc Thomas Zimmermann <[email protected]>
Cc Daniel Thompson (RISCstar) <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Lee Jones <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc Jingoo Han <[email protected]>

---
This is fallout from a recent cleanup of the backlight header file. I don't have the option of building or testing this change, though.

---
 arch/sh/include/cpu-sh3/cpu/dac.h | 2 ++
 1 file changed, 2 insertions(+)
arch/sh/include/cpu-sh3/cpu/dac.h +0 -0
index fd02331608a8..323ec8570bcd 100644

arch/sh/include/cpu-sh3/cpu/dac.h line 9

Quoted 8 lines
arch/sh/include/cpu-sh3/cpu/dac.h +2 -0
@@ -2,6 +2,8 @@
 #ifndef __ASM_CPU_SH3_DAC_H
 #define __ASM_CPU_SH3_DAC_H
 
+#include <linux/io.h>
+
 /*
  * Copyright (C) 2003  Andriy Skulysh
  */

I'm just looking at this patch again and was wondering where <linux/backlight.h> is actually being pulled in on SH3. I assume this is somewhere on the driver side, no?

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
#4 lore raw

Hi

Am 12.04.26 um 09:35 schrieb John Paul Adrian Glaubitz:

Quoted 32 lines

Hi Thomas,

Quoted 29 lines · Thomas Zimmermann

Include <linux/io.h> to avoid depending on <linux/backlight.h> for including it. Declares __raw_readb() and __raw_writeb().

Fixes 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
Cc Thomas Zimmermann <[email protected]>
Cc Daniel Thompson (RISCstar) <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Lee Jones <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc Jingoo Han <[email protected]>

---
This is fallout from a recent cleanup of the backlight header file. I don't have the option of building or testing this change, though.

---
  arch/sh/include/cpu-sh3/cpu/dac.h | 2 ++
  1 file changed, 2 insertions(+)
arch/sh/include/cpu-sh3/cpu/dac.h +0 -0
index fd02331608a8..323ec8570bcd 100644
@@ -2,6 +2,8 @@
  #ifndef __ASM_CPU_SH3_DAC_H
  #define __ASM_CPU_SH3_DAC_H
 
Quoted 7 lines

arch/sh/include/cpu-sh3/cpu/dac.h line 9

Quoted 5 lines
arch/sh/include/cpu-sh3/cpu/dac.h +2 -0
+#include <linux/io.h>
+
  /*
   * Copyright (C) 2003  Andriy Skulysh
   */

I'm just looking at this patch again and was wondering where <linux/backlight.h> is actually being pulled in on SH3. I assume this is somewhere on the driver side, no?

Oh well, it's been ages...

I've been cleaning up the plenty of places that include <linux/fb.h> and <linux/backlight.h> unnecessarily. Besides the Fixes tag, presumably commit df1445598758 ("backlight: hp680_bl: Do not include <linux/fb.h>") is involved as well. The hp680_bl backlight driver got <linux/io.h> via <linux/fb.h> via <linux/backlight.h> before including <cpu/dac.h>. With fb.h gone from backlight.h gone,  dac.h should best include its dependencies. Hence the patch here.

Best regards
Thomas

Quoted 3 lines

Adrian

Signature · 6 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
#5 lore raw

Hi Thomas,

Quoted 45 lines · Thomas Zimmermann

Hi

Am 12.04.26 um 09:35 schrieb John Paul Adrian Glaubitz:

Quoted 32 lines

Hi Thomas,

Quoted 29 lines · Thomas Zimmermann

Include <linux/io.h> to avoid depending on <linux/backlight.h> for including it. Declares __raw_readb() and __raw_writeb().

Fixes 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
Cc Thomas Zimmermann <[email protected]>
Cc Daniel Thompson (RISCstar) <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Lee Jones <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc Jingoo Han <[email protected]>

---
This is fallout from a recent cleanup of the backlight header file. I don't have the option of building or testing this change, though.

---
  arch/sh/include/cpu-sh3/cpu/dac.h | 2 ++
  1 file changed, 2 insertions(+)
arch/sh/include/cpu-sh3/cpu/dac.h +0 -0
index fd02331608a8..323ec8570bcd 100644
@@ -2,6 +2,8 @@
  #ifndef __ASM_CPU_SH3_DAC_H
  #define __ASM_CPU_SH3_DAC_H
 
Quoted 7 lines

arch/sh/include/cpu-sh3/cpu/dac.h line 9

Quoted 5 lines
arch/sh/include/cpu-sh3/cpu/dac.h +2 -0
+#include <linux/io.h>
+
  /*
   * Copyright (C) 2003  Andriy Skulysh
   */

I'm just looking at this patch again and was wondering where <linux/backlight.h> is actually being pulled in on SH3. I assume this is somewhere on the driver side, no?

Oh well, it's been ages...

Quoted 7 lines

I've been cleaning up the plenty of places that include <linux/fb.h> and <linux/backlight.h> unnecessarily. Besides the Fixes tag, presumably commit df1445598758 ("backlight: hp680_bl: Do not include <linux/fb.h>") is involved as well. The hp680_bl backlight driver got <linux/io.h> via <linux/fb.h> via <linux/backlight.h> before including <cpu/dac.h>. With fb.h gone from backlight.h gone,  dac.h should best include its dependencies. Hence the patch here.

Perfect, thanks for the quick explanation! I will pick up the patch then.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
maintainer Reviewed-by on v1 1/1
#6 lore raw
In reply to Thomas Zimmermann
Quoted 26 lines · Thomas Zimmermann

Include <linux/io.h> to avoid depending on <linux/backlight.h> for including it. Declares __raw_readb() and __raw_writeb().

Fixes 243ce64b2b37 ("backlight: Do not include <linux/fb.h> in header file")
Cc Thomas Zimmermann <[email protected]>
Cc Daniel Thompson (RISCstar) <[email protected]>
Cc Simona Vetter <[email protected]>
Cc Lee Jones <[email protected]>
Cc Daniel Thompson <[email protected]>
Cc Jingoo Han <[email protected]>

---
This is fallout from a recent cleanup of the backlight header file. I don't have the option of building or testing this change, though.

---
 arch/sh/include/cpu-sh3/cpu/dac.h | 2 ++
 1 file changed, 2 insertions(+)
arch/sh/include/cpu-sh3/cpu/dac.h +0 -0
index fd02331608a8..323ec8570bcd 100644

arch/sh/include/cpu-sh3/cpu/dac.h line 9

Quoted 8 lines
arch/sh/include/cpu-sh3/cpu/dac.h +2 -0
@@ -2,6 +2,8 @@
 #ifndef __ASM_CPU_SH3_DAC_H
 #define __ASM_CPU_SH3_DAC_H
 
+#include <linux/io.h>
+
 /*
  * Copyright (C) 2003  Andriy Skulysh
  */

Will pick this up today for v7.1.

Adrian

Signature · 4 lines
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913