pinctrl-lynxpoint.c (caedcbd053bca446f8d66faf74adeb8eb3d2913f) | pinctrl-lynxpoint.c (a718e68ede16957e091ee8f35f7b73765e51a092) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * GPIO controller driver for Intel Lynxpoint PCH chipset> 4 * Copyright (c) 2012, Intel Corporation. 5 * 6 * Author: Mathias Nyman <mathias.nyman@linux.intel.com> 7 */ 8 --- 313 unchanged lines hidden (view full) --- 322{ 323 struct lp_gpio *lg; 324 struct gpio_chip *gc; 325 struct resource *io_rc, *irq_rc; 326 struct device *dev = &pdev->dev; 327 unsigned long reg_len; 328 int ret; 329 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * GPIO controller driver for Intel Lynxpoint PCH chipset> 4 * Copyright (c) 2012, Intel Corporation. 5 * 6 * Author: Mathias Nyman <mathias.nyman@linux.intel.com> 7 */ 8 --- 313 unchanged lines hidden (view full) --- 322{ 323 struct lp_gpio *lg; 324 struct gpio_chip *gc; 325 struct resource *io_rc, *irq_rc; 326 struct device *dev = &pdev->dev; 327 unsigned long reg_len; 328 int ret; 329 |
330 lg = devm_kzalloc(dev, sizeof(struct lp_gpio), GFP_KERNEL); | 330 lg = devm_kzalloc(dev, sizeof(*lg), GFP_KERNEL); |
331 if (!lg) 332 return -ENOMEM; 333 334 lg->pdev = pdev; 335 platform_set_drvdata(pdev, lg); 336 337 io_rc = platform_get_resource(pdev, IORESOURCE_IO, 0); 338 irq_rc = platform_get_resource(pdev, IORESOURCE_IRQ, 0); --- 132 unchanged lines hidden --- | 331 if (!lg) 332 return -ENOMEM; 333 334 lg->pdev = pdev; 335 platform_set_drvdata(pdev, lg); 336 337 io_rc = platform_get_resource(pdev, IORESOURCE_IO, 0); 338 irq_rc = platform_get_resource(pdev, IORESOURCE_IRQ, 0); --- 132 unchanged lines hidden --- |