hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/leds/leds-lm355x.c
....@@ -1,16 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Simple driver for Texas Instruments LM355x LED Flash driver chip
34 * Copyright (C) 2012 Texas Instruments
4
-*
5
-* This program is free software; you can redistribute it and/or modify
6
-* it under the terms of the GNU General Public License version 2 as
7
-* published by the Free Software Foundation.
85 */
96
107 #include <linux/module.h>
118 #include <linux/delay.h>
129 #include <linux/i2c.h>
13
-#include <linux/gpio.h>
1410 #include <linux/leds.h>
1511 #include <linux/slab.h>
1612 #include <linux/platform_device.h>
....@@ -457,8 +453,7 @@
457453 chip->cdev_flash.max_brightness = 16;
458454 chip->cdev_flash.brightness_set_blocking = lm355x_strobe_brightness_set;
459455 chip->cdev_flash.default_trigger = "flash";
460
- err = led_classdev_register((struct device *)
461
- &client->dev, &chip->cdev_flash);
456
+ err = led_classdev_register(&client->dev, &chip->cdev_flash);
462457 if (err < 0)
463458 goto err_out;
464459 /* torch */
....@@ -466,8 +461,7 @@
466461 chip->cdev_torch.max_brightness = 8;
467462 chip->cdev_torch.brightness_set_blocking = lm355x_torch_brightness_set;
468463 chip->cdev_torch.default_trigger = "torch";
469
- err = led_classdev_register((struct device *)
470
- &client->dev, &chip->cdev_torch);
464
+ err = led_classdev_register(&client->dev, &chip->cdev_torch);
471465 if (err < 0)
472466 goto err_create_torch_file;
473467 /* indicator */
....@@ -481,8 +475,7 @@
481475 /* indicator pattern control only for LM3556 */
482476 if (id->driver_data == CHIP_LM3556)
483477 chip->cdev_indicator.groups = lm355x_indicator_groups;
484
- err = led_classdev_register((struct device *)
485
- &client->dev, &chip->cdev_indicator);
478
+ err = led_classdev_register(&client->dev, &chip->cdev_indicator);
486479 if (err < 0)
487480 goto err_create_indicator_file;
488481