| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Simple driver for Texas Instruments LM355x LED Flash driver chip |
|---|
| 3 | 4 | * 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. |
|---|
| 8 | 5 | */ |
|---|
| 9 | 6 | |
|---|
| 10 | 7 | #include <linux/module.h> |
|---|
| 11 | 8 | #include <linux/delay.h> |
|---|
| 12 | 9 | #include <linux/i2c.h> |
|---|
| 13 | | -#include <linux/gpio.h> |
|---|
| 14 | 10 | #include <linux/leds.h> |
|---|
| 15 | 11 | #include <linux/slab.h> |
|---|
| 16 | 12 | #include <linux/platform_device.h> |
|---|
| .. | .. |
|---|
| 457 | 453 | chip->cdev_flash.max_brightness = 16; |
|---|
| 458 | 454 | chip->cdev_flash.brightness_set_blocking = lm355x_strobe_brightness_set; |
|---|
| 459 | 455 | 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); |
|---|
| 462 | 457 | if (err < 0) |
|---|
| 463 | 458 | goto err_out; |
|---|
| 464 | 459 | /* torch */ |
|---|
| .. | .. |
|---|
| 466 | 461 | chip->cdev_torch.max_brightness = 8; |
|---|
| 467 | 462 | chip->cdev_torch.brightness_set_blocking = lm355x_torch_brightness_set; |
|---|
| 468 | 463 | 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); |
|---|
| 471 | 465 | if (err < 0) |
|---|
| 472 | 466 | goto err_create_torch_file; |
|---|
| 473 | 467 | /* indicator */ |
|---|
| .. | .. |
|---|
| 481 | 475 | /* indicator pattern control only for LM3556 */ |
|---|
| 482 | 476 | if (id->driver_data == CHIP_LM3556) |
|---|
| 483 | 477 | 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); |
|---|
| 486 | 479 | if (err < 0) |
|---|
| 487 | 480 | goto err_create_indicator_file; |
|---|
| 488 | 481 | |
|---|