[CORE] devdrv: Make classdev related APIs SMP safe

Signed-off-by: Anup Patel <anup@brainfault.org>