Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3698045imj; Tue, 19 Feb 2019 07:58:46 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibj1GCDp6mPwuLTjhmhy8eXAxZA92zd5Kv6pcEjPJGGGWCaeT2/PE5ydeMKkye6pqt/TU1f X-Received: by 2002:a63:1845:: with SMTP id 5mr24951427pgy.108.1550591926702; Tue, 19 Feb 2019 07:58:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550591926; cv=none; d=google.com; s=arc-20160816; b=XkCPJMBsNl6gjqFyuX6vY7mtpQQUGhu6B2ok7OghqGtr4aso8z8RkDNGSvCn81ByOa XdDFbJgPg/WHqPIFqaPZCtCqc8DG4LHGvcH4dzZMu8sG3NwECQDDbSSI2y7kbndq6Qjl Qait/6sf/OFuVmZ0EtTW2aMYEAwk7GQWh4m5/KPmByJ6BjuL4+/A/rP+5XqO6lr2xo7N p1MSC86cUhUbwab55EJe2I8cCLoV0DFKo/Zi2GpwTOnVZZqOm97NaEkC3qGw23J9tEZr Ulv1NGMqUlFJCJ/z2+EKlCNNnY6HSBejuuJu9MuC01weVlFPRSVjOdZpYsegJbluzzn3 LCvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from; bh=bA/2vsq+HDy37ahsKJGd8zK+HAqJU8X9jXSbGelopAk=; b=UQmmv9Zk6WCb5tsHHKm6inYBBoJOnPshh1XiAaqC26qoqjpPyvB5YGi6/oHLbxZ9ER v57lGMI77jVr92fve3uug4ganGec/pVLUBQ0zEZR42YOAoHcN4XV48sOPDLw3nw7k64o n8D1TJbz7uNSfoeEnvgynpM7Bcz2ujBrcFYQWbfw4Ihjv/gWiHzrLmEOM9xw4S7YM89p C6sD4HCLhfjM3WJOBA4KsqivJK/50lsOLw8ope9VbuIU6ZP1dIQtGB+autPa4mwSHyv4 4UBqJmKkyHcV3iRE9p4DwTBR6uoVDbraFGOmR7mleS7ms6NTH90d8YWlO2gJjZGRMX+a 0dZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 79si16342874pgb.351.2019.02.19.07.58.31; Tue, 19 Feb 2019 07:58:46 -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; 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 S1729003AbfBSP5o (ORCPT + 99 others); Tue, 19 Feb 2019 10:57:44 -0500 Received: from mx2.suse.de ([195.135.220.15]:51974 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728201AbfBSP5m (ORCPT ); Tue, 19 Feb 2019 10:57:42 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E5DA1AEB8; Tue, 19 Feb 2019 15:57:40 +0000 (UTC) From: Thomas Bogendoerfer To: Marc Zyngier , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH v2 09/10] genirq/irqdomain: fall back to default domain when creating hierarchy domain Date: Tue, 19 Feb 2019 16:57:23 +0100 Message-Id: <20190219155728.19163-10-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20190219155728.19163-1-tbogendoerfer@suse.de> References: <20190219155728.19163-1-tbogendoerfer@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When creating hierarchy domains use irq_default_domain as parent, if no parent was given by the caller. This avoids adding helper code for querying the underlying platform irq domain. Signed-off-by: Thomas Bogendoerfer --- kernel/irq/irqdomain.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 8b0be4bd6565..617c482d0778 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -1021,7 +1021,10 @@ struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, else domain = irq_domain_create_tree(fwnode, ops, host_data); if (domain) { - domain->parent = parent; + if (parent) + domain->parent = parent; + else + domain->parent = irq_default_domain; domain->flags |= flags; } -- 2.13.7