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

leds: verify vendor and change license in mlxcpld driver

Verify that vendor is Mellanox as the first step of initialization.
If it is not - return ENODEV.
Change module license from "GPL v2" to "Dual BSD/GPL".

Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>

authored by

Vadim Pasternak and committed by
Jacek Anaszewski
dca897e2 a8c170b0

+4 -1
+4 -1
drivers/leds/leds-mlxcpld.c
··· 400 400 struct platform_device *pdev; 401 401 int err; 402 402 403 + if (!dmi_match(DMI_CHASSIS_VENDOR, "Mellanox Technologies Ltd.")) 404 + return -ENODEV; 405 + 403 406 pdev = platform_device_register_simple(KBUILD_MODNAME, -1, NULL, 0); 404 407 if (IS_ERR(pdev)) { 405 408 pr_err("Device allocation failed\n"); ··· 429 426 430 427 MODULE_AUTHOR("Vadim Pasternak <vadimp@mellanox.com>"); 431 428 MODULE_DESCRIPTION("Mellanox board LED driver"); 432 - MODULE_LICENSE("GPL v2"); 429 + MODULE_LICENSE("Dual BSD/GPL"); 433 430 MODULE_ALIAS("platform:leds_mlxcpld");