Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: janz-ttl: Drop unneccessary temp variable dev

don't need the temporary variable "dev", directly use &pdev->dev

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Enrico Weigelt, metux IT consult and committed by
Linus Walleij
52728565 01d078aa

+4 -5
+4 -5
drivers/gpio/gpio-janz-ttl.c
··· 144 144 static int ttl_probe(struct platform_device *pdev) 145 145 { 146 146 struct janz_platform_data *pdata; 147 - struct device *dev = &pdev->dev; 148 147 struct ttl_module *mod; 149 148 struct gpio_chip *gpio; 150 149 int ret; 151 150 152 151 pdata = dev_get_platdata(&pdev->dev); 153 152 if (!pdata) { 154 - dev_err(dev, "no platform data\n"); 153 + dev_err(&pdev->dev, "no platform data\n"); 155 154 return -ENXIO; 156 155 } 157 156 158 - mod = devm_kzalloc(dev, sizeof(*mod), GFP_KERNEL); 157 + mod = devm_kzalloc(&pdev->dev, sizeof(*mod), GFP_KERNEL); 159 158 if (!mod) 160 159 return -ENOMEM; 161 160 ··· 180 181 gpio->base = -1; 181 182 gpio->ngpio = 20; 182 183 183 - ret = devm_gpiochip_add_data(dev, gpio, NULL); 184 + ret = devm_gpiochip_add_data(&pdev->dev, gpio, NULL); 184 185 if (ret) { 185 - dev_err(dev, "unable to add GPIO chip\n"); 186 + dev_err(&pdev->dev, "unable to add GPIO chip\n"); 186 187 return ret; 187 188 } 188 189