]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: sm750fb: remove unused functions
authorKenet Jovan Sokoli <deep@crimson.net.eu.org>
Sat, 18 Apr 2026 14:36:20 +0000 (16:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Apr 2026 11:01:51 +0000 (05:01 -0600)
The functions sm750_enable_i2c() and sm750_hw_cursor_set_data2() are
defined and declared but never used. Following the driver's TODO list
to remove unused code, this patch deletes these dead functions.

Verified by compilation and cppcheck.

Signed-off-by: Kenet Jovan Sokoli <deep@crimson.net.eu.org>
Link: https://patch.msgid.link/20260418143620.845355-1-deep@crimson.net.eu.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/ddk750_power.c
drivers/staging/sm750fb/ddk750_power.h
drivers/staging/sm750fb/sm750_cursor.c
drivers/staging/sm750fb/sm750_cursor.h

index 12834f78eef7848e8a0daf423c84525e90837125..eaba3bc2e01a610d84b6180941640581ad9e0c48 100644 (file)
@@ -126,20 +126,3 @@ void sm750_enable_gpio(unsigned int enable)
 
        sm750_set_current_gate(gate);
 }
-
-/*
- * This function enable/disable the I2C Engine
- */
-void sm750_enable_i2c(unsigned int enable)
-{
-       u32 gate;
-
-       /* Enable I2C Gate */
-       gate = peek32(CURRENT_GATE);
-       if (enable)
-               gate |= CURRENT_GATE_I2C;
-       else
-               gate &= ~CURRENT_GATE_I2C;
-
-       sm750_set_current_gate(gate);
-}
index 5cbb11986bb89e657dc8c7ac9cd6b19f2d136e12..1c4f054d72760bf664c73c691076d7292b5a052f 100644 (file)
@@ -33,9 +33,4 @@ void sm750_enable_dma(unsigned int enable);
  */
 void sm750_enable_gpio(unsigned int enable);
 
-/*
- * This function enable/disable the I2C Engine
- */
-void sm750_enable_i2c(unsigned int enable);
-
 #endif
index 7ede144905c9239b041f31befc71f4cc99681a8e..f0338e6e76b1cd7741178008e25dd2407669e8e5 100644 (file)
@@ -130,46 +130,3 @@ void sm750_hw_cursor_set_data(struct lynx_cursor *cursor, u16 rop,
                }
        }
 }
-
-void sm750_hw_cursor_set_data2(struct lynx_cursor *cursor, u16 rop,
-                              const u8 *pcol, const u8 *pmsk)
-{
-       int i, j, count, pitch, offset;
-       u8 color, mask;
-       u16 data;
-       void __iomem *pbuffer, *pstart;
-
-       /*  in byte*/
-       pitch = cursor->w >> 3;
-
-       /* in byte      */
-       count = pitch * cursor->h;
-
-       /* in byte */
-       offset = cursor->max_w * 2 / 8;
-
-       data = 0;
-       pstart = cursor->vstart;
-       pbuffer = pstart;
-
-       for (i = 0; i < count; i++) {
-               color = *pcol++;
-               mask = *pmsk++;
-               data = 0;
-
-               for (j = 0; j < 8; j++) {
-                       if (mask & (1 << j))
-                               data |= ((color & (1 << j)) ? 1 : 2) << (j * 2);
-               }
-               iowrite16(data, pbuffer);
-
-               /* assume pitch is 1,2,4,8,...*/
-               if (!(i & (pitch - 1))) {
-                       /* need a return */
-                       pstart += offset;
-                       pbuffer = pstart;
-               } else {
-                       pbuffer += sizeof(u16);
-               }
-       }
-}
index 88fa02f6377a4250e1c4f112eda8e1da41f97b2b..51ba0da0270c281628f562c45b4ec0daa6b9ac92 100644 (file)
@@ -10,6 +10,4 @@ void sm750_hw_cursor_set_pos(struct lynx_cursor *cursor, int x, int y);
 void sm750_hw_cursor_set_color(struct lynx_cursor *cursor, u32 fg, u32 bg);
 void sm750_hw_cursor_set_data(struct lynx_cursor *cursor, u16 rop,
                              const u8 *data, const u8 *mask);
-void sm750_hw_cursor_set_data2(struct lynx_cursor *cursor, u16 rop,
-                              const u8 *data, const u8 *mask);
 #endif