i2c-xlp9xx.c (a4721ced760684d1776bf31f7925aa41bb3f4846) | i2c-xlp9xx.c (e0442d76213981ab48e8ea0874bb6c47e3af5a36) |
---|---|
1/* 2 * Copyright (c) 2003-2015 Broadcom Corporation 3 * 4 * This file is licensed under the terms of the GNU General Public 5 * License version 2. This program is licensed "as is" without any 6 * warranty of any kind, whether express or implied. 7 */ 8 --- 492 unchanged lines hidden (view full) --- 501 priv->ara = ara; 502 503 return 0; 504} 505 506static int xlp9xx_i2c_probe(struct platform_device *pdev) 507{ 508 struct xlp9xx_i2c_dev *priv; | 1/* 2 * Copyright (c) 2003-2015 Broadcom Corporation 3 * 4 * This file is licensed under the terms of the GNU General Public 5 * License version 2. This program is licensed "as is" without any 6 * warranty of any kind, whether express or implied. 7 */ 8 --- 492 unchanged lines hidden (view full) --- 501 priv->ara = ara; 502 503 return 0; 504} 505 506static int xlp9xx_i2c_probe(struct platform_device *pdev) 507{ 508 struct xlp9xx_i2c_dev *priv; |
509 struct resource *res; | |
510 int err = 0; 511 512 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 513 if (!priv) 514 return -ENOMEM; 515 | 509 int err = 0; 510 511 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 512 if (!priv) 513 return -ENOMEM; 514 |
516 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 517 priv->base = devm_ioremap_resource(&pdev->dev, res); | 515 priv->base = devm_platform_ioremap_resource(pdev, 0); |
518 if (IS_ERR(priv->base)) 519 return PTR_ERR(priv->base); 520 521 priv->irq = platform_get_irq(pdev, 0); 522 if (priv->irq <= 0) { 523 dev_err(&pdev->dev, "invalid irq!\n"); 524 return priv->irq; 525 } --- 83 unchanged lines hidden --- | 516 if (IS_ERR(priv->base)) 517 return PTR_ERR(priv->base); 518 519 priv->irq = platform_get_irq(pdev, 0); 520 if (priv->irq <= 0) { 521 dev_err(&pdev->dev, "invalid irq!\n"); 522 return priv->irq; 523 } --- 83 unchanged lines hidden --- |