From patchwork Fri Dec 12 15:04:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 420508 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9BCCC140100 for ; Sat, 13 Dec 2014 02:04:45 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968108AbaLLPEo (ORCPT ); Fri, 12 Dec 2014 10:04:44 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:63509 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967963AbaLLPEo (ORCPT ); Fri, 12 Dec 2014 10:04:44 -0500 Received: by mail-wi0-f171.google.com with SMTP id bs8so2754752wib.16 for ; Fri, 12 Dec 2014 07:04:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oh/YUh/xJoOVG0lotgyhr9Cquklw/svg65vifEf5zms=; b=SM3mnv2uazgLWgGu56ru6pPXSTKLCvFl9qzDIj29eFZUdhzKgA7z/sEmjyDsITXzKK lp739aoKvfEhiDZYjkHygtmPDVqWuYHHTLLhle6x15QJebqAli2mDYU4MW+OvKWvH++r Ylxr/tIKvfv0JZbROliUgvsOCDDvJEvJO9EHNFI9OjgMq2YnFYvcjxORDlOk5ccb2EJU wKD416lyEAAZUuyvcClE+19ObRu2643cmJRIayc/BOKBC8ikKl2+1E67D5AXevxbhGjm sIwPQTzBGrI/10hiJ124MuNtllAcRSgj/w/2SXnxfGH6U2N1xYNCxJNGQrvZK09GmuNu qOkg== X-Gm-Message-State: ALoCoQkrj7IJuZUuVWAm60WvU6B/i5GKxyHFjYI8GS++7ZWD5FBu0OrZYKrp7wUCE9WSFNO+Ckdv X-Received: by 10.180.75.199 with SMTP id e7mr8518591wiw.21.1418396681385; Fri, 12 Dec 2014 07:04:41 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id u9sm2130326wjy.37.2014.12.12.07.04.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Dec 2014 07:04:40 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij , Alexander Stein Subject: [PATCH] gpio: mcp23s08: fix up compilation error Date: Fri, 12 Dec 2014 16:04:35 +0100 Message-Id: <1418396675-16959-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The driver depends on the chip.of_node being present to compile, which is the case on some target platforms but not others. Instead, rely on chip.dev->of_node to be used, as struct device always has an of_node in place. Cc: Alexander Stein Suggested-by: Linus Torvalds Signed-off-by: Linus Walleij --- drivers/gpio/gpio-mcp23s08.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c index 93ee7da2d8b0..da9c316059bc 100644 --- a/drivers/gpio/gpio-mcp23s08.c +++ b/drivers/gpio/gpio-mcp23s08.c @@ -655,8 +655,9 @@ static int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, mcp->irq_controller = pdata->irq_controller; if (mcp->irq && mcp->irq_controller) { - mcp->irq_active_high = of_property_read_bool(mcp->chip.of_node, - "microchip,irq-active-high"); + mcp->irq_active_high = + of_property_read_bool(mcp->chip.dev->of_node, + "microchip,irq-active-high"); if (type == MCP_TYPE_017) mirror = pdata->mirror;