mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:30:52 +07:00
leds: drop redundant struct-device pointer casts
Drop the pointless and needlessly confusing casts of struct-device pointers. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Pavel Machek <pavel@ucw.cz>
This commit is contained in:
parent
47a459ecc8
commit
b5684a73d2
@ -453,8 +453,7 @@ static int lm355x_probe(struct i2c_client *client,
|
|||||||
chip->cdev_flash.max_brightness = 16;
|
chip->cdev_flash.max_brightness = 16;
|
||||||
chip->cdev_flash.brightness_set_blocking = lm355x_strobe_brightness_set;
|
chip->cdev_flash.brightness_set_blocking = lm355x_strobe_brightness_set;
|
||||||
chip->cdev_flash.default_trigger = "flash";
|
chip->cdev_flash.default_trigger = "flash";
|
||||||
err = led_classdev_register((struct device *)
|
err = led_classdev_register(&client->dev, &chip->cdev_flash);
|
||||||
&client->dev, &chip->cdev_flash);
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
/* torch */
|
/* torch */
|
||||||
@ -462,8 +461,7 @@ static int lm355x_probe(struct i2c_client *client,
|
|||||||
chip->cdev_torch.max_brightness = 8;
|
chip->cdev_torch.max_brightness = 8;
|
||||||
chip->cdev_torch.brightness_set_blocking = lm355x_torch_brightness_set;
|
chip->cdev_torch.brightness_set_blocking = lm355x_torch_brightness_set;
|
||||||
chip->cdev_torch.default_trigger = "torch";
|
chip->cdev_torch.default_trigger = "torch";
|
||||||
err = led_classdev_register((struct device *)
|
err = led_classdev_register(&client->dev, &chip->cdev_torch);
|
||||||
&client->dev, &chip->cdev_torch);
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_create_torch_file;
|
goto err_create_torch_file;
|
||||||
/* indicator */
|
/* indicator */
|
||||||
@ -477,8 +475,7 @@ static int lm355x_probe(struct i2c_client *client,
|
|||||||
/* indicator pattern control only for LM3556 */
|
/* indicator pattern control only for LM3556 */
|
||||||
if (id->driver_data == CHIP_LM3556)
|
if (id->driver_data == CHIP_LM3556)
|
||||||
chip->cdev_indicator.groups = lm355x_indicator_groups;
|
chip->cdev_indicator.groups = lm355x_indicator_groups;
|
||||||
err = led_classdev_register((struct device *)
|
err = led_classdev_register(&client->dev, &chip->cdev_indicator);
|
||||||
&client->dev, &chip->cdev_indicator);
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_create_indicator_file;
|
goto err_create_indicator_file;
|
||||||
|
|
||||||
|
@ -340,8 +340,7 @@ static int lm3642_probe(struct i2c_client *client,
|
|||||||
chip->cdev_flash.brightness_set_blocking = lm3642_strobe_brightness_set;
|
chip->cdev_flash.brightness_set_blocking = lm3642_strobe_brightness_set;
|
||||||
chip->cdev_flash.default_trigger = "flash";
|
chip->cdev_flash.default_trigger = "flash";
|
||||||
chip->cdev_flash.groups = lm3642_flash_groups,
|
chip->cdev_flash.groups = lm3642_flash_groups,
|
||||||
err = led_classdev_register((struct device *)
|
err = led_classdev_register(&client->dev, &chip->cdev_flash);
|
||||||
&client->dev, &chip->cdev_flash);
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(chip->dev, "failed to register flash\n");
|
dev_err(chip->dev, "failed to register flash\n");
|
||||||
goto err_out;
|
goto err_out;
|
||||||
@ -353,8 +352,7 @@ static int lm3642_probe(struct i2c_client *client,
|
|||||||
chip->cdev_torch.brightness_set_blocking = lm3642_torch_brightness_set;
|
chip->cdev_torch.brightness_set_blocking = lm3642_torch_brightness_set;
|
||||||
chip->cdev_torch.default_trigger = "torch";
|
chip->cdev_torch.default_trigger = "torch";
|
||||||
chip->cdev_torch.groups = lm3642_torch_groups,
|
chip->cdev_torch.groups = lm3642_torch_groups,
|
||||||
err = led_classdev_register((struct device *)
|
err = led_classdev_register(&client->dev, &chip->cdev_torch);
|
||||||
&client->dev, &chip->cdev_torch);
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(chip->dev, "failed to register torch\n");
|
dev_err(chip->dev, "failed to register torch\n");
|
||||||
goto err_create_torch_file;
|
goto err_create_torch_file;
|
||||||
@ -365,8 +363,7 @@ static int lm3642_probe(struct i2c_client *client,
|
|||||||
chip->cdev_indicator.max_brightness = 8;
|
chip->cdev_indicator.max_brightness = 8;
|
||||||
chip->cdev_indicator.brightness_set_blocking =
|
chip->cdev_indicator.brightness_set_blocking =
|
||||||
lm3642_indicator_brightness_set;
|
lm3642_indicator_brightness_set;
|
||||||
err = led_classdev_register((struct device *)
|
err = led_classdev_register(&client->dev, &chip->cdev_indicator);
|
||||||
&client->dev, &chip->cdev_indicator);
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(chip->dev, "failed to register indicator\n");
|
dev_err(chip->dev, "failed to register indicator\n");
|
||||||
goto err_create_indicator_file;
|
goto err_create_indicator_file;
|
||||||
|
Loading…
Reference in New Issue
Block a user