Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc: kernel: apc: Remove macro APC_MINOR definition

Macro APC_MINOR is defined as MISC_DYNAMIC_MINOR to request dynamic
minor, but its name 'APC_MINOR' looks like fixed minor.

Remove the macro definition and directly use MISC_DYNAMIC_MINOR instead.

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250714-rfc_miscdev-v6-8-2ed949665bde@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Zijun Hu and committed by
Greg Kroah-Hartman
51ad6d97 d7f8d075

+1 -2
+1 -2
arch/sparc/kernel/apc.c
··· 28 28 * #define APC_DEBUG_LED 29 29 */ 30 30 31 - #define APC_MINOR MISC_DYNAMIC_MINOR 32 31 #define APC_OBPNAME "power-management" 33 32 #define APC_DEVNAME "apc" 34 33 ··· 137 138 .llseek = noop_llseek, 138 139 }; 139 140 140 - static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; 141 + static struct miscdevice apc_miscdev = { MISC_DYNAMIC_MINOR, APC_DEVNAME, &apc_fops }; 141 142 142 143 static int apc_probe(struct platform_device *op) 143 144 {