From patchwork Wed Apr 23 14:58:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 28906 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f71.google.com (mail-qg0-f71.google.com [209.85.192.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A9D8E203AC for ; Wed, 23 Apr 2014 15:19:41 +0000 (UTC) Received: by mail-qg0-f71.google.com with SMTP id f51sf2647583qge.2 for ; Wed, 23 Apr 2014 08:19:41 -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=XY/pGw16zN44M5CzcZyU5vioEa6P9SYhuecPLsqDjiA=; b=CoU/NN84abdXmU/hbkIIYFmxOaf/XvYR1Aqyq0+acjPgZLQGj8NR2vvNs4mUTo+H5o 8heVlFTyyveWi2/E52iyYy5yl4D4Fl7q5y7atSf9q69ZRED3ovvQxxwh53B5tnokSUSU Xy12l3BM0m5nU/6/F1uzhjrR1Ktm5UiD/OOt/vDY+LFQX5PkXvFFCyagk7y0aJdkqvg6 ic2ldAwvj8pdk7tiFamlCT1OfDDEzZAWo4wvFZTOJNtvi+7HM/f65iNYPiQ2u3x7YBHz UUfJOW0r2r12mgWTXhQOvyXY+EajemGK0ywRChiCqG4RFQtL+eSmndmSwfwRl/1+emPM UxuQ== X-Gm-Message-State: ALoCoQnwMmx35VwNRPLW91DFlQgfLvk1SBiS8KvdzDxfGV5nRZqaHNxc4kpkVAYy+gNR8FABHqtb X-Received: by 10.58.196.209 with SMTP id io17mr26839168vec.7.1398266381372; Wed, 23 Apr 2014 08:19:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.119 with SMTP id 110ls649791qgu.20.gmail; Wed, 23 Apr 2014 08:19:41 -0700 (PDT) X-Received: by 10.221.58.144 with SMTP id wk16mr14411215vcb.23.1398266381246; Wed, 23 Apr 2014 08:19:41 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id sw4si223934vdc.84.2014.04.23.08.19.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 08:19:41 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if17so1309133vcb.36 for ; Wed, 23 Apr 2014 08:19:41 -0700 (PDT) X-Received: by 10.220.105.130 with SMTP id t2mr5890845vco.18.1398266381177; Wed, 23 Apr 2014 08:19:41 -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.221.72 with SMTP id ib8csp112081vcb; Wed, 23 Apr 2014 08:19:40 -0700 (PDT) X-Received: by 10.68.229.68 with SMTP id so4mr55916486pbc.110.1398266380346; Wed, 23 Apr 2014 08:19:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oz6si815879pac.92.2014.04.23.08.19.40; Wed, 23 Apr 2014 08:19:40 -0700 (PDT) Received-SPF: none (google.com: linux-serial-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757698AbaDWPTh (ORCPT + 2 others); Wed, 23 Apr 2014 11:19:37 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:60576 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757073AbaDWPBN (ORCPT ); Wed, 23 Apr 2014 11:01:13 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3NF17bO030751; Wed, 23 Apr 2014 10:01:07 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3NF176U021801; Wed, 23 Apr 2014 10:01:07 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 23 Apr 2014 10:01:07 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3NF16s5001793; Wed, 23 Apr 2014 10:01:07 -0500 From: Felipe Balbi To: Greg KH CC: , , , , , Linux Kernel Mailing List , , , , Linux OMAP Mailing List , Tony Lindgren , Felipe Balbi Subject: [PATCH 08/13] tty: serial: omap: switch over to platform_get_resource Date: Wed, 23 Apr 2014 09:58:32 -0500 Message-ID: <1398265117-11793-8-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.2.459.g68773ac In-Reply-To: <1398265117-11793-1-git-send-email-balbi@ti.com> References: <1398265117-11793-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-serial-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-serial@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: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 3813740..cb45e88 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1644,7 +1644,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; @@ -1658,12 +1657,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);