From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DE96FA372C for ; Fri, 8 Nov 2019 13:02:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F9D2222CF for ; Fri, 8 Nov 2019 13:02:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="btUNt8m0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729795AbfKHNCG (ORCPT ); Fri, 8 Nov 2019 08:02:06 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45387 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729448AbfKHNCD (ORCPT ); Fri, 8 Nov 2019 08:02:03 -0500 Received: by mail-lj1-f194.google.com with SMTP id n21so6106070ljg.12 for ; Fri, 08 Nov 2019 05:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UljkrHErTTnMZOnzGC3cVx/3LEJEQ4UWt74UluMX0lk=; b=btUNt8m0uV4K7rFRwIU8q6zzflOOAMijjQeLyfrjzcaIczK5jbDtdELyjy9dr04RD6 VsDmKA7rt6Vd7Bj8D6PEuCjxR7+LvQCtJVl/OhH5dz/1en8np2tnjoWXw+wArp7P9bhz 9UKoh5jfu0tbKnJOUZqtsYgj/Cn0lm7JvLu4k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UljkrHErTTnMZOnzGC3cVx/3LEJEQ4UWt74UluMX0lk=; b=gFsU2IucWXfjvnNBA24deqUS3ugmaFh/ajE5u+YC2sarhlylTXgSvLN/YXQribpB5P TJQp8f5h5o9dSudvLG8+3Q7Rd/huwbJ4Rqqp41rnHgP1Mq8/96N0N1CXmiRWm8s8BfCM 1T0GbtN6BGt02vIz+8D7NV2ySjk4HsIMSmBf15v/yEULIWP+9r6yaRo6msMPZ+hhY5aP LVJSasbRxw+GwVZewh1Vr8zrIhsnVdZCgmw32H+qDpvXgmtWEQ8odtQZW3D/YSEv/o+B ynP+lTIlKUx2kuavdSv0n2GFjkUqJ8WEknROT3WsQApKqA7SC3FcBAaCxnfFkm2JRNo4 jZng== X-Gm-Message-State: APjAAAVG8aoc/bzP8IjgJTZqH4NAUUj5u1nvWRVCGP5Dj+TszJ55+Uam 23Ahp7mercC6xsX7IOSwOAzBIg== X-Google-Smtp-Source: APXvYqxTzVF8/JKsKMHYte+9aWvfI7aAER8ibdsachcG+KIWPQShSZfW9EYappa6aFPy4j79NTv/Bg== X-Received: by 2002:a05:651c:119b:: with SMTP id w27mr6123930ljo.221.1573218119558; Fri, 08 Nov 2019 05:01:59 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id d28sm2454725lfn.33.2019.11.08.05.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 05:01:59 -0800 (PST) From: Rasmus Villemoes To: Qiang Zhao , Li Yang , Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Scott Wood , Rasmus Villemoes Subject: [PATCH v4 25/47] soc: fsl: qe: qe_io.c: use of_property_read_u32() in par_io_init() Date: Fri, 8 Nov 2019 14:01:01 +0100 Message-Id: <20191108130123.6839-26-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108130123.6839-1-linux@rasmusvillemoes.dk> References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is necessary for this to work on little-endian hosts. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_io.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c index 61dd8eb8c0fe..11ea08e97db7 100644 --- a/drivers/soc/fsl/qe/qe_io.c +++ b/drivers/soc/fsl/qe/qe_io.c @@ -28,7 +28,7 @@ int par_io_init(struct device_node *np) { struct resource res; int ret; - const u32 *num_ports; + u32 num_ports; /* Map Parallel I/O ports registers */ ret = of_address_to_resource(np, 0, &res); @@ -36,9 +36,8 @@ int par_io_init(struct device_node *np) return ret; par_io = ioremap(res.start, resource_size(&res)); - num_ports = of_get_property(np, "num-ports", NULL); - if (num_ports) - num_par_io_ports = *num_ports; + if (!of_property_read_u32(np, "num-ports", &num_ports)) + num_par_io_ports = num_ports; return 0; } -- 2.23.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48D74FA372C for ; Fri, 8 Nov 2019 14:34:53 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EAC9D214DB for ; Fri, 8 Nov 2019 14:34:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="btUNt8m0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EAC9D214DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 478jTk4K8jzF4PG for ; Sat, 9 Nov 2019 01:34:50 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=rasmusvillemoes.dk (client-ip=2a00:1450:4864:20::241; helo=mail-lj1-x241.google.com; envelope-from=linux@rasmusvillemoes.dk; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="btUNt8m0"; dkim-atps=neutral Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 478gQg6RRbzF6tH for ; Sat, 9 Nov 2019 00:02:03 +1100 (AEDT) Received: by mail-lj1-x241.google.com with SMTP id l20so6126819lje.4 for ; Fri, 08 Nov 2019 05:02:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UljkrHErTTnMZOnzGC3cVx/3LEJEQ4UWt74UluMX0lk=; b=btUNt8m0uV4K7rFRwIU8q6zzflOOAMijjQeLyfrjzcaIczK5jbDtdELyjy9dr04RD6 VsDmKA7rt6Vd7Bj8D6PEuCjxR7+LvQCtJVl/OhH5dz/1en8np2tnjoWXw+wArp7P9bhz 9UKoh5jfu0tbKnJOUZqtsYgj/Cn0lm7JvLu4k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UljkrHErTTnMZOnzGC3cVx/3LEJEQ4UWt74UluMX0lk=; b=D7hiuy/TvPXbHvyvJ7LAwOY5ZQAfRzMtLttSBpXbPshIwxW9ibgNZ+f7q7vo8WBuM7 y/eViX1dp5sDWJGyJ39stNGnJr3B708zBE2TgVr99E4kvSi7LhdfRCHct+CK6lqeuWt2 DGv1+sRFpElh9uqCohaknkTzahClvWu4ASwlLhqDgx4y5vaLy1qnBWYIXDF8PiV8M8UX sTlIGEgVbBsaVUfX4Ox6LJw0eEq4ZvXcwTeyDDL9VcwdUH6w4+3hq6FmfD06Ky5bp0Qm APkK+dkBrYYuw1DAj8Z0MvEBDIus70dmGCk8ZHh/MEa1p/Uy8fGFI4fTrxhzAOb44zgY CByA== X-Gm-Message-State: APjAAAXU2y3W1Qruy+0muMNeme/Wwob+ef7JBVAm6B+7aDjTN23LfdIN UMZ0P80DtNq+1ShZNRQoxPRU2g== X-Google-Smtp-Source: APXvYqxTzVF8/JKsKMHYte+9aWvfI7aAER8ibdsachcG+KIWPQShSZfW9EYappa6aFPy4j79NTv/Bg== X-Received: by 2002:a05:651c:119b:: with SMTP id w27mr6123930ljo.221.1573218119558; Fri, 08 Nov 2019 05:01:59 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id d28sm2454725lfn.33.2019.11.08.05.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 05:01:59 -0800 (PST) From: Rasmus Villemoes To: Qiang Zhao , Li Yang , Christophe Leroy Subject: [PATCH v4 25/47] soc: fsl: qe: qe_io.c: use of_property_read_u32() in par_io_init() Date: Fri, 8 Nov 2019 14:01:01 +0100 Message-Id: <20191108130123.6839-26-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108130123.6839-1-linux@rasmusvillemoes.dk> References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Scott Wood , Rasmus Villemoes , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" This is necessary for this to work on little-endian hosts. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_io.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c index 61dd8eb8c0fe..11ea08e97db7 100644 --- a/drivers/soc/fsl/qe/qe_io.c +++ b/drivers/soc/fsl/qe/qe_io.c @@ -28,7 +28,7 @@ int par_io_init(struct device_node *np) { struct resource res; int ret; - const u32 *num_ports; + u32 num_ports; /* Map Parallel I/O ports registers */ ret = of_address_to_resource(np, 0, &res); @@ -36,9 +36,8 @@ int par_io_init(struct device_node *np) return ret; par_io = ioremap(res.start, resource_size(&res)); - num_ports = of_get_property(np, "num-ports", NULL); - if (num_ports) - num_par_io_ports = *num_ports; + if (!of_property_read_u32(np, "num-ports", &num_ports)) + num_par_io_ports = num_ports; return 0; } -- 2.23.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15CCAFA372C for ; Fri, 8 Nov 2019 13:09:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA666206A3 for ; Fri, 8 Nov 2019 13:09:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sDE85nPa"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="btUNt8m0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA666206A3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1mM+2dSENWxvehibhiEMfWtyxLXhtrkDdQi0dxK+52E=; b=sDE85nPag+Qdfi eJdLuZv3tNPJm37Bh6CoWjTAGphXdfjVEOQR9xdGx02FE3CpirBbuskCguHJKLahs0RWdO2glhKo/ dXXf8ijg0pDsBvF21P2qFvnNdePd0snZPhs7ag5McYSyX5IOTaUDe1ghfML7h/mVVBSexsIaeRir+ DEwj56XCwK9tVu1wYBJKxvJO75NtqZiXJNKB2YMOo1dbFhNs6s4xk4h2dOiAOCMIwR190HLSmFmK3 dorrYnJTOSGaMXDqHQiiLfFa7UFsmBbgTiowpqjiaZ5uwTVwrIqKueTACqp3494nY3ou7vDyqCG60 h7ULlw4recaWEA7JIQMA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iT40z-0003Zx-9h; Fri, 08 Nov 2019 13:09:25 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iT3tp-0004cF-Jd for linux-arm-kernel@lists.infradead.org; Fri, 08 Nov 2019 13:02:03 +0000 Received: by mail-lj1-x244.google.com with SMTP id m9so6113771ljh.8 for ; Fri, 08 Nov 2019 05:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UljkrHErTTnMZOnzGC3cVx/3LEJEQ4UWt74UluMX0lk=; b=btUNt8m0uV4K7rFRwIU8q6zzflOOAMijjQeLyfrjzcaIczK5jbDtdELyjy9dr04RD6 VsDmKA7rt6Vd7Bj8D6PEuCjxR7+LvQCtJVl/OhH5dz/1en8np2tnjoWXw+wArp7P9bhz 9UKoh5jfu0tbKnJOUZqtsYgj/Cn0lm7JvLu4k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UljkrHErTTnMZOnzGC3cVx/3LEJEQ4UWt74UluMX0lk=; b=o2zeprhf52uiColELU0ga3nFydk61pWEHFr7zIG9biRE/DSVZnRIZms0ujBpLLCe/v 1Pp2qzg3kLeUeeCiFct1lBsCG2GT7DjtkeUvJdXOkzugKFNS5DTGvubeBOftyeBnZeeP HHdv4c8bzDAvTCocsx7X4yHTVb94FvcYKqD9qDK9F6OU+IpLtxAjR0JN+rZ674YzYH8y hH8MX/YFkPMbvdYutidh+XNIwpoolHfpcrkDdEz1PzKkdQ7Ag3ZFY1kpFnjaVQ8fhW4z ROlEsIxAWujGyJOPy6tgYLa9NtlOUbkqLQpZLACtHRdhPmE1LXjwaPYFi0sLxf9CFHTX JnIA== X-Gm-Message-State: APjAAAX7JBPjBLG82M16dsqMi7/81UF+eUs7iigD2lcrp4JP0frYkA6i AliE0JeZB2R/mm+GwIg+m8Ekqw== X-Google-Smtp-Source: APXvYqxTzVF8/JKsKMHYte+9aWvfI7aAER8ibdsachcG+KIWPQShSZfW9EYappa6aFPy4j79NTv/Bg== X-Received: by 2002:a05:651c:119b:: with SMTP id w27mr6123930ljo.221.1573218119558; Fri, 08 Nov 2019 05:01:59 -0800 (PST) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id d28sm2454725lfn.33.2019.11.08.05.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2019 05:01:59 -0800 (PST) From: Rasmus Villemoes To: Qiang Zhao , Li Yang , Christophe Leroy Subject: [PATCH v4 25/47] soc: fsl: qe: qe_io.c: use of_property_read_u32() in par_io_init() Date: Fri, 8 Nov 2019 14:01:01 +0100 Message-Id: <20191108130123.6839-26-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108130123.6839-1-linux@rasmusvillemoes.dk> References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191108_050201_669600_EA6A845B X-CRM114-Status: GOOD ( 10.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Scott Wood , Rasmus Villemoes , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is necessary for this to work on little-endian hosts. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe_io.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qe/qe_io.c b/drivers/soc/fsl/qe/qe_io.c index 61dd8eb8c0fe..11ea08e97db7 100644 --- a/drivers/soc/fsl/qe/qe_io.c +++ b/drivers/soc/fsl/qe/qe_io.c @@ -28,7 +28,7 @@ int par_io_init(struct device_node *np) { struct resource res; int ret; - const u32 *num_ports; + u32 num_ports; /* Map Parallel I/O ports registers */ ret = of_address_to_resource(np, 0, &res); @@ -36,9 +36,8 @@ int par_io_init(struct device_node *np) return ret; par_io = ioremap(res.start, resource_size(&res)); - num_ports = of_get_property(np, "num-ports", NULL); - if (num_ports) - num_par_io_ports = *num_ports; + if (!of_property_read_u32(np, "num-ports", &num_ports)) + num_par_io_ports = num_ports; return 0; } -- 2.23.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel