diff options
Diffstat (limited to 'drivers/gpio/gpio-janz-ttl.c')
-rw-r--r-- | drivers/gpio/gpio-janz-ttl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-janz-ttl.c b/drivers/gpio/gpio-janz-ttl.c index 6b9bf8b7bf16..b97a91166497 100644 --- a/drivers/gpio/gpio-janz-ttl.c +++ b/drivers/gpio/gpio-janz-ttl.c | |||
@@ -147,7 +147,6 @@ static int ttl_probe(struct platform_device *pdev) | |||
147 | struct device *dev = &pdev->dev; | 147 | struct device *dev = &pdev->dev; |
148 | struct ttl_module *mod; | 148 | struct ttl_module *mod; |
149 | struct gpio_chip *gpio; | 149 | struct gpio_chip *gpio; |
150 | struct resource *res; | ||
151 | int ret; | 150 | int ret; |
152 | 151 | ||
153 | pdata = dev_get_platdata(&pdev->dev); | 152 | pdata = dev_get_platdata(&pdev->dev); |
@@ -164,8 +163,7 @@ static int ttl_probe(struct platform_device *pdev) | |||
164 | spin_lock_init(&mod->lock); | 163 | spin_lock_init(&mod->lock); |
165 | 164 | ||
166 | /* get access to the MODULbus registers for this module */ | 165 | /* get access to the MODULbus registers for this module */ |
167 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 166 | mod->regs = devm_platform_ioremap_resource(pdev, 0); |
168 | mod->regs = devm_ioremap_resource(dev, res); | ||
169 | if (IS_ERR(mod->regs)) | 167 | if (IS_ERR(mod->regs)) |
170 | return PTR_ERR(mod->regs); | 168 | return PTR_ERR(mod->regs); |
171 | 169 | ||