Commit dca897e2 authored by Vadim Pasternak's avatar Vadim Pasternak Committed by Jacek Anaszewski

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: default avatarVadim Pasternak <vadimp@mellanox.com>
Signed-off-by: default avatarJacek Anaszewski <j.anaszewski@samsung.com>
parent a8c170b0
...@@ -400,6 +400,9 @@ static int __init mlxcpld_led_init(void) ...@@ -400,6 +400,9 @@ static int __init mlxcpld_led_init(void)
struct platform_device *pdev; struct platform_device *pdev;
int err; int err;
if (!dmi_match(DMI_CHASSIS_VENDOR, "Mellanox Technologies Ltd."))
return -ENODEV;
pdev = platform_device_register_simple(KBUILD_MODNAME, -1, NULL, 0); pdev = platform_device_register_simple(KBUILD_MODNAME, -1, NULL, 0);
if (IS_ERR(pdev)) { if (IS_ERR(pdev)) {
pr_err("Device allocation failed\n"); pr_err("Device allocation failed\n");
...@@ -426,5 +429,5 @@ module_exit(mlxcpld_led_exit); ...@@ -426,5 +429,5 @@ module_exit(mlxcpld_led_exit);
MODULE_AUTHOR("Vadim Pasternak <vadimp@mellanox.com>"); MODULE_AUTHOR("Vadim Pasternak <vadimp@mellanox.com>");
MODULE_DESCRIPTION("Mellanox board LED driver"); MODULE_DESCRIPTION("Mellanox board LED driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("Dual BSD/GPL");
MODULE_ALIAS("platform:leds_mlxcpld"); MODULE_ALIAS("platform:leds_mlxcpld");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment