diff mbox series

fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags

Message ID 303bb1a5012862f0003d3246a0c8120b97ea995b.1693483416.git.geert+renesas@glider.be (mailing list archive)
State Accepted, archived
Headers show
Series fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags | expand

Commit Message

Geert Uytterhoeven Aug. 31, 2023, 12:05 p.m. UTC
The .need_pwm and .need_chargepump fields in struct ssd1307fb_deviceinfo
are flags that can have only two possible values: 0 and 1.
Reduce kernel size by changing their types from int to bool.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/video/fbdev/ssd1307fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Javier Martinez Canillas Aug. 31, 2023, 5:39 p.m. UTC | #1
Geert Uytterhoeven <geert@linux-m68k.org> writes:

> The .need_pwm and .need_chargepump fields in struct ssd1307fb_deviceinfo
> are flags that can have only two possible values: 0 and 1.
> Reduce kernel size by changing their types from int to bool.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---

Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Helge Deller Aug. 31, 2023, 9:40 p.m. UTC | #2
On 8/31/23 14:05, Geert Uytterhoeven wrote:
> The .need_pwm and .need_chargepump fields in struct ssd1307fb_deviceinfo
> are flags that can have only two possible values: 0 and 1.
> Reduce kernel size by changing their types from int to bool.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

applied to fbdev git tree.

Thanks!
Helge

> ---
>   drivers/video/fbdev/ssd1307fb.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index 86dd24022871a843..5ae48e36fccb4e8d 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -52,8 +52,8 @@ struct ssd1307fb_deviceinfo {
>   	u32 default_vcomh;
>   	u32 default_dclk_div;
>   	u32 default_dclk_frq;
> -	int need_pwm;
> -	int need_chargepump;
> +	bool need_pwm;
> +	bool need_chargepump;
>   };
>
>   struct ssd1307fb_par {
diff mbox series

Patch

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 86dd24022871a843..5ae48e36fccb4e8d 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -52,8 +52,8 @@  struct ssd1307fb_deviceinfo {
 	u32 default_vcomh;
 	u32 default_dclk_div;
 	u32 default_dclk_frq;
-	int need_pwm;
-	int need_chargepump;
+	bool need_pwm;
+	bool need_chargepump;
 };
 
 struct ssd1307fb_par {