From patchwork Thu Mar 20 19:30:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 26765 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B687E20143 for ; Thu, 20 Mar 2014 19:38:01 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j7sf2769704qaq.10 for ; Thu, 20 Mar 2014 12:38:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=xH8MLF+U0vDnbTr3y+2eNKFsXUzIQDQ9jdRgnRE2cEM=; b=bFWLpi0CYY3iZMTYCnnsWiWJLUov/6VxVt08wpnEyauSfyrGh6FReJoWFYbjPTUlAZ pRZrzGQGUTCgM6hvCdHI7gqcurR0uE0i3WZqFDewkCOroOt5NZKNdWqfNDIX9mie8mLB 9whgNm+uRUK9YtOrUbhgMcK1TT9PBnXy1AkEbtWpD3H4ezyhiKQFclXXp2wJDPyJxsRM uCKjMZ93icVFofzEUTvIafXE92bL61GXz3O6eiQ/zrBcFlp/2+YMt+TNjA5uOPna0nMO vkFgLR0DrTXpKoJ3gDjSUJlU9ESMv5Hpv41MWOx4UbNffe7Dx5pXrtiuqzK9NREsxK2V aBkQ== X-Gm-Message-State: ALoCoQmNw/gZU5icHuZo5Rl/qsc4nirVPIMgPdsS+zM/ByRfnDm7g8ZZKS3XGqlDvHk+1q6Xi2ge X-Received: by 10.236.210.48 with SMTP id t36mr14735897yho.44.1395344281420; Thu, 20 Mar 2014 12:38:01 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.23.233 with SMTP id 96ls349507qgp.61.gmail; Thu, 20 Mar 2014 12:38:01 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr34994278vcm.11.1395344281313; Thu, 20 Mar 2014 12:38:01 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id ie18si644919vec.121.2014.03.20.12.38.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 12:38:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id oz11so1483216veb.19 for ; Thu, 20 Mar 2014 12:38:01 -0700 (PDT) X-Received: by 10.221.61.210 with SMTP id wx18mr6014719vcb.27.1395344281233; Thu, 20 Mar 2014 12:38:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp414266vck; Thu, 20 Mar 2014 12:38:00 -0700 (PDT) X-Received: by 10.68.138.227 with SMTP id qt3mr49724058pbb.6.1395344279952; Thu, 20 Mar 2014 12:37:59 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m8si1829052pbd.159.2014.03.20.12.37.59; Thu, 20 Mar 2014 12:37:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933923AbaCTThv (ORCPT + 26 others); Thu, 20 Mar 2014 15:37:51 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:57351 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964985AbaCTTcB (ORCPT ); Thu, 20 Mar 2014 15:32:01 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2KJVwSF012227; Thu, 20 Mar 2014 14:31:58 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2KJVwua018653; Thu, 20 Mar 2014 14:31:58 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Thu, 20 Mar 2014 14:31:58 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2KJVvAQ010270; Thu, 20 Mar 2014 14:31:58 -0500 From: Felipe Balbi To: Greg KH CC: , , , , , Linux OMAP Mailing List , Linux Kernel Mailing List , Felipe Balbi Subject: [PATCH 04/11] tty: serial: omap: switch over to platform_get_resource Date: Thu, 20 Mar 2014 14:30:00 -0500 Message-ID: <1395343807-21618-4-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.1.286.g5172cb3 In-Reply-To: <1395343807-21618-1-git-send-email-balbi@ti.com> References: <1395343807-21618-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , this way we can remove one pointer declaration. Signed-off-by: Felipe Balbi --- drivers/tty/serial/omap-serial.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 6831425..d041060 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1627,7 +1627,6 @@ static int serial_omap_probe(struct platform_device *pdev) struct omap_uart_port_info *omap_up_info = dev_get_platdata(&pdev->dev); struct uart_omap_port *up; struct resource *mem; - struct resource *irq; int uartirq = 0; int wakeirq = 0; int ret; @@ -1641,12 +1640,9 @@ static int serial_omap_probe(struct platform_device *pdev) omap_up_info = of_get_uart_port_info(&pdev->dev); pdev->dev.platform_data = omap_up_info; } else { - irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!irq) { - dev_err(&pdev->dev, "no irq resource?\n"); - return -ENODEV; - } - uartirq = irq->start; + uartirq = platform_get_irq(pdev, 0); + if (uartirq < 0) + return -EPROBE_DEFER; } mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);