File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11
11
#include <linux/io.h>
12
12
#include <linux/mod_devicetable.h>
13
13
#include <linux/platform_device.h>
14
+ #include <linux/property.h>
14
15
#include <linux/slab.h>
15
16
#include <linux/spinlock.h>
16
17
@@ -169,6 +170,7 @@ static const struct gpio_chip zevio_gpio_chip = {
169
170
/* Initialization */
170
171
static int zevio_gpio_probe (struct platform_device * pdev )
171
172
{
173
+ struct device * dev = & pdev -> dev ;
172
174
struct zevio_gpio * controller ;
173
175
int status , i ;
174
176
@@ -180,6 +182,10 @@ static int zevio_gpio_probe(struct platform_device *pdev)
180
182
controller -> chip = zevio_gpio_chip ;
181
183
controller -> chip .parent = & pdev -> dev ;
182
184
185
+ controller -> chip .label = devm_kasprintf (dev , GFP_KERNEL , "%pfw" , dev_fwnode (dev ));
186
+ if (!controller -> chip .label )
187
+ return - ENOMEM ;
188
+
183
189
controller -> regs = devm_platform_ioremap_resource (pdev , 0 );
184
190
if (IS_ERR (controller -> regs ))
185
191
return dev_err_probe (& pdev -> dev , PTR_ERR (controller -> regs ),
You can’t perform that action at this time.
0 commit comments