Skip to contentSkip to conversation

platform/x86/sony-laptop: Remove unused sony laptop camera code

PATCH In review [email protected] 2 participants 2 messages May 5, 2025 – May 7, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 platform/x86/sony-laptop: Remove unused sony laptop camera code

From: "Dr. David Alan Gilbert" <[email protected]>

commit ba47652ba655 ("media: meye: remove this deprecated driver") removed the meye driver but left behind the code in sony-laptop.c which that driver used to call.

Remove the sony_pic_camera_command() function, and the set of defines (SONY_PIC_COMMAND_*) in a header used for the interface and the static helpers it called.

Cleanup remaining #defines.

---
v2
Removed more #defines after Ilpo's review

 MAINTAINERS                        |   1 -
 drivers/platform/x86/sony-laptop.c | 167 -----------------------------
 include/linux/sony-laptop.h        |  39 -------
 3 files changed, 207 deletions(-)
 delete mode 100644 include/linux/sony-laptop.h
MAINTAINERS +0 -1
index 2aed76827090..6c865b5d8fae 100644
@@ -22671,7 +22671,6 @@ W:	http://www.linux.it/~malattia/wiki/index.php/Sony_drivers
 F:	Documentation/admin-guide/laptops/sony-laptop.rst
 F:	drivers/char/sonypi.c
 F:	drivers/platform/x86/sony-laptop.c
-F:	include/linux/sony-laptop.h
 
 SOPHGO DEVICETREES and DRIVERS
 M:	Chen Wang <[email protected]>
drivers/platform/x86/sony-laptop.c +0 -167

185 lines not on this page · raw message

include/linux/sony-laptop.h deleted +0 -39
deleted file mode 100644
index 1e3c92feea6e..000000000000
@@ -1,39 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _SONYLAPTOP_H_
-#define _SONYLAPTOP_H_
-
-#include <linux/types.h>
-
-#ifdef __KERNEL__
-
-/* used only for communication between v4l and sony-laptop */
-
-#define SONY_PIC_COMMAND_GETCAMERA		 1	/* obsolete */
-#define SONY_PIC_COMMAND_SETCAMERA		 2
-#define SONY_PIC_COMMAND_GETCAMERABRIGHTNESS	 3	/* obsolete */
-#define SONY_PIC_COMMAND_SETCAMERABRIGHTNESS	 4
-#define SONY_PIC_COMMAND_GETCAMERACONTRAST	 5	/* obsolete */
-#define SONY_PIC_COMMAND_SETCAMERACONTRAST	 6
-#define SONY_PIC_COMMAND_GETCAMERAHUE		 7	/* obsolete */
-#define SONY_PIC_COMMAND_SETCAMERAHUE		 8
-#define SONY_PIC_COMMAND_GETCAMERACOLOR		 9	/* obsolete */
-#define SONY_PIC_COMMAND_SETCAMERACOLOR		10
-#define SONY_PIC_COMMAND_GETCAMERASHARPNESS	11	/* obsolete */
-#define SONY_PIC_COMMAND_SETCAMERASHARPNESS	12
-#define SONY_PIC_COMMAND_GETCAMERAPICTURE	13	/* obsolete */
-#define SONY_PIC_COMMAND_SETCAMERAPICTURE	14
-#define SONY_PIC_COMMAND_GETCAMERAAGC		15	/* obsolete */
-#define SONY_PIC_COMMAND_SETCAMERAAGC		16
-#define SONY_PIC_COMMAND_GETCAMERADIRECTION	17	/* obsolete */
-#define SONY_PIC_COMMAND_GETCAMERAROMVERSION	18	/* obsolete */
-#define SONY_PIC_COMMAND_GETCAMERAREVISION	19	/* obsolete */
-
-#if IS_ENABLED(CONFIG_SONY_LAPTOP)
-int sony_pic_camera_command(int command, u8 value);
-#else
-static inline int sony_pic_camera_command(int command, u8 value) { return 0; }
-#endif
-
-#endif	/* __KERNEL__ */
-
-#endif /* _SONYLAPTOP_H_ */
Signature · 1 line
2.49.0
maintainer
#1 lore raw
Quoted 9 lines · On Mon, 05 May 2025 16:25:58 +0100, [email protected] wrote:

commit ba47652ba655 ("media: meye: remove this deprecated driver") removed the meye driver but left behind the code in sony-laptop.c which that driver used to call.

Remove the sony_pic_camera_command() function, and the set of defines (SONY_PIC_COMMAND_*) in a header used for the interface and the static helpers it called.

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-next branch. Note it will show up in the public platform-drivers-x86/review-ilpo-next branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86/sony-laptop: Remove unused sony laptop camera code

      commit: a7c33fd14dbcece11c053727158c72804bb65bf1

--
i.