From patchwork Mon Apr 8 10:04:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2406931 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9FFF13FE81 for ; Mon, 8 Apr 2013 10:16:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965141Ab3DHKQw (ORCPT ); Mon, 8 Apr 2013 06:16:52 -0400 Received: from mail-da0-f44.google.com ([209.85.210.44]:48426 "EHLO mail-da0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965139Ab3DHKQv (ORCPT ); Mon, 8 Apr 2013 06:16:51 -0400 Received: by mail-da0-f44.google.com with SMTP id z20so2569911dae.3 for ; Mon, 08 Apr 2013 03:16:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=iyUQ3tH9S8eN8eUnKxnLcafWtlVL0ULIVgOQfKvUU0I=; b=nAeDKRdub/KAVd0cjGAcAxHUeqTJgS1KfrvZ2JN1186Zst9upXqCnzO0hQ1xR4PqxO Ky0p/O+70UWWBac2ThvBtEu3WNAnG6c6QMR+dH1MRtGIfY2ah8VSkKjpL5wNr1j6TxJz DvvoystExthZJgvo58JL+fLTjvwb6Fjgu5HqSg/EjEFLiGZexLYBeEDvkY0Hx+7+20bl MhJvd94nuBRWQPAy6JeuF8YQWt3JelaG9BYb66To7Yn+EcNTGhwfuyXQSD9lyzpX+ukm sPcLm4CI/CX855ZtY5NJXaQqv7raeMinKYy9hyKegHyP/bF/5ZC+wQVvszsjtSW98Ch3 nwxA== X-Received: by 10.66.232.230 with SMTP id tr6mr36141525pac.83.1365416210598; Mon, 08 Apr 2013 03:16:50 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPS id m9sm29310344paa.17.2013.04.08.03.16.47 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Apr 2013 03:16:50 -0700 (PDT) From: Sachin Kamat To: linux-fbdev@vger.kernel.org Cc: linux@prisktech.co.nz, tomi.valkeinen@ti.com, sachin.kamat@linaro.org Subject: [PATCH 1/1] video: wm8505fb: Convert to devm_ioremap_resource() Date: Mon, 8 Apr 2013 15:34:56 +0530 Message-Id: <1365415496-6825-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQkZ9QTsREUbPhElQzQ3FhRbd0ENJrSzi0TeziGUalNoVUpyloPAp5yBfJ6FE1Q5BPgB5n3x Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat Acked-by: Tony Prisk --- drivers/video/wm8505fb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c index 19e2e7f..01f9ace 100644 --- a/drivers/video/wm8505fb.c +++ b/drivers/video/wm8505fb.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -303,9 +304,9 @@ static int wm8505fb_probe(struct platform_device *pdev) fbi->fb.pseudo_palette = addr; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - fbi->regbase = devm_request_and_ioremap(&pdev->dev, res); - if (fbi->regbase == NULL) - return -EBUSY; + fbi->regbase = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(fbi->regbase)) + return PTR_ERR(fbi->regbase); disp_timing = of_get_display_timings(pdev->dev.of_node); if (!disp_timing)