From patchwork Thu May 30 09:41:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 2635401 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 963E240077 for ; Thu, 30 May 2013 09:41:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968062Ab3E3JlL (ORCPT ); Thu, 30 May 2013 05:41:11 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:40080 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968041Ab3E3JlK (ORCPT ); Thu, 30 May 2013 05:41:10 -0400 Received: by mail-we0-f178.google.com with SMTP id q56so28662wes.9 for ; Thu, 30 May 2013 02:41:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:content-type :x-gm-message-state; bh=ys0VwI2K8Zx744DLhELfSAMJLYy2qu14LrrrUdiLEtg=; b=A03bJ6QIyNoKErmJls1YSQpYlBto6iXALxcnJluqYMWDvrPAlWQsdbrrieBnm92XVl cLlzPhChMHRFEg608PtNbwf3XxnAYNSoho5nL/Eu51qr+/2T9RZQThh13O8+ahEEsL8Q P2/0NdnXilDeuT7FWvlC1vv+ptQoDxJ3QmU2NHincoX1W8l2N/lFIX6zRnb7JSKc320G JWGj5LihO0Cy3/0HDF9vGKSYRfI/nuZ0UfJrbLswWqPhmCFBkdoBN3lwzhJgxH+9dIiY ucujY23dRLio/ergH7aHgJ8+obqrJttGEnhQxhbvqqt6261eN9LRDzI+AqvxZE7CQ9eu p2+A== X-Received: by 10.180.206.176 with SMTP id lp16mr3589732wic.43.1369906868609; Thu, 30 May 2013 02:41:08 -0700 (PDT) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id h8sm36689060wiz.9.2013.05.30.02.41.07 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 02:41:07 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org Cc: Michal Simek , Michal Simek , Florian Tobias Schandinat , Grant Likely , Rob Herring , linux-fbdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH v2 1/3] video: xilinxfb: Fix OF probing on little-endian systems Date: Thu, 30 May 2013 11:41:00 +0200 Message-Id: <27e53d5633766ab0dc1ac492023d5a0d0199e3aa.1369906849.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.8.2.3 X-Gm-Message-State: ALoCoQnHWtfiVylj6z2l2DGDamuHCVpu56if9RU/E11bQnZxsz+xS3VYVENcvUb8PQVe4mav5YhG Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org From: Michal Simek DTB is always big-endian that's why is necessary to convert it. Signed-off-by: Michal Simek --- Changes in v2: - use of_property_read_u32 helper function drivers/video/xilinxfb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 1.8.2.3 diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index af0b4fd..aecd15d 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c @@ -406,8 +406,7 @@ static int xilinxfb_release(struct device *dev) static int xilinxfb_of_probe(struct platform_device *op) { const u32 *prop; - u32 *p; - u32 tft_access; + u32 tft_access = 0; struct xilinxfb_platform_data pdata; struct resource res; int size, rc; @@ -427,8 +426,8 @@ static int xilinxfb_of_probe(struct platform_device *op) * To check whether the core is connected directly to DCR or PLB * interface and initialize the tft_access accordingly. */ - p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL); - tft_access = p ? *p : 0; + of_property_read_u32(op->dev.of_node, "xlnx,dcr-splb-slave-if", + &tft_access); /* * Fill the resource structure if its direct PLB interface