summaryrefslogtreecommitdiffstats
path: root/drivers/led/led-pca955x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/led-pca955x.c')
-rw-r--r--drivers/led/led-pca955x.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/led/led-pca955x.c b/drivers/led/led-pca955x.c
index 07bc26a50b..cad4db3799 100644
--- a/drivers/led/led-pca955x.c
+++ b/drivers/led/led-pca955x.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2007-2008 Extreme Engineering Solutions, Inc.
* Author: Nate Case <ncase@xes-inc.com>
@@ -5,16 +6,6 @@
* Copyright (C) 2018 WAGO Kontakttechnik GmbH & Co. KG <http://global.wago.com>
* Author: Oleg Karfich <oleg.karfich@wago.com>
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
* This code was ported from linux-4.18 kernel driver.
* Orginal code with it's copyright info can be found in
* drivers/leds/leds-pca955x.c
@@ -334,8 +325,9 @@ static const struct of_device_id of_pca955x_match[] = {
{ .compatible = "nxp,pca9553", .data = &pca9553_chipdef },
{},
};
+MODULE_DEVICE_TABLE(of, of_pca955x_match);
-static int led_pca955x_probe(struct device_d *dev)
+static int led_pca955x_probe(struct device *dev)
{
struct pca955x *pca955x;
struct pca955x_led *pca955x_led;
@@ -374,7 +366,7 @@ static int led_pca955x_probe(struct device_d *dev)
pca955x->client = client;
pca955x->chipdef = chip;
- pdata = led_pca955x_pdata_of_init(dev->device_node, pca955x);
+ pdata = led_pca955x_pdata_of_init(dev->of_node, pca955x);
if (IS_ERR(pdata))
return PTR_ERR(pdata);
@@ -396,14 +388,13 @@ static int led_pca955x_probe(struct device_d *dev)
err = pca955x_write_psc(client, 0, 0);
if (err)
return err;
+
err = pca955x_write_psc(client, 1, 0);
- if (err)
- return err;
- return 0;
+ return err;
}
-static struct driver_d led_pca955x_driver = {
+static struct driver led_pca955x_driver = {
.name = "led-pca955x",
.probe = led_pca955x_probe,
.id_table = led_pca955x_id,