Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2481829ybx; Fri, 8 Nov 2019 05:03:40 -0800 (PST) X-Google-Smtp-Source: APXvYqzJxiyt2x8PvmIY7mTxgyrTOH5jfxKJJH94UQ2pWs94AS8qbhg/AgbLBKPb/PaJRQbBvxcA X-Received: by 2002:adf:f4c9:: with SMTP id h9mr7798929wrp.354.1573218220230; Fri, 08 Nov 2019 05:03:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573218220; cv=none; d=google.com; s=arc-20160816; b=Lcj/OGMVDEFV7fs3p+PRSI+P0VVgsB0g4MouLevB+9DyKOJKnh2rTO9zGYK9Dh8lP7 1McsOHfoUbK6Wq66DtM9WOQmkLYJmUBWfgOCQhbrqL8+NLazwcVlnmkbxzkAptydCKu7 XLQEFTd75Nbih+litfiKOiL+TdvvlujhwvrQCOakDTHEEBNy1bK2L/KOrCb4zs96SLAq h4hv+WTEiu9vvUNR4ktgfWkZLOuOx4IrqJQPlMdG+DHMv6RxEJbHyJzsHvOsgYaWyNy6 Wu8WwwpqCTcOScCEUEMyDsYQQlDD58sRqbpQHPMHX1h+1dovwAkzCjlIqUg6KRJrbFuW llCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UljkrHErTTnMZOnzGC3cVx/3LEJEQ4UWt74UluMX0lk=; b=HoekKRFP1cuCKKaw9Axu7ZIpBYHORQc6lLxfZcV8wrRRDhVlshW447ypWbjClR8Jyl iZIEYA1109qO2z4tfZV4qOS861jTSG0oP0VyRyffFJCQJZBDtwkJJQUxVHPVRPixzWBG UfP2JXVg98WjqKi991DrZvltJ8YVj5HeM33uFcHWiVYxOuFqf0UEWzTFUT5Rn1TkT4ma hN/oJfKZ+MDbRjr+Kfwyoxi80xiOaFH4Mx7obazKT2NKLDdHBm+hP/uh6y87wYvkemoC r3wkEor2GmINf0Sjz9BrHkfw3fuVoX8JTKMDkELx51EA5isUTbv11v0x43iC5v7KEkvP jEew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=btUNt8m0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dc21si3665197ejb.101.2019.11.08.05.03.16; Fri, 08 Nov 2019 05:03:40 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=btUNt8m0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729771AbfKHNCF (ORCPT + 99 others); Fri, 8 Nov 2019 08:02:05 -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-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