Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2950034pxk; Mon, 28 Sep 2020 04:46:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZr0YiHWMmAxhbkNoQEClAizImWOU123IhWNsZmJiLBGxsWZj9gb2qohbxWsHmNtu0dFr/ X-Received: by 2002:a17:906:3ca2:: with SMTP id b2mr1253524ejh.460.1601293598783; Mon, 28 Sep 2020 04:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601293598; cv=none; d=google.com; s=arc-20160816; b=wFMdAp2bK0jejvu8w8cH7Qy+8HESC+CmIBdZs2FlOxMwiY9ykcDX3uswPga5KRavgF k+FXSLxjN6p51o5RmcnCYBJQDbWxZxNj6QnQSYTYVvFyqMj6MDoMG1e4kwAUsFlVexB9 MksriVMUcWLolWfmZ1tTGX968c4385KRlzIdc109ZiKBmp3Sc83PC3qWhxMESN2O+NW7 pzf5jDtnroSk4RLzp7WaKR9ussuM1AXCx02tsTdMnIHqv4kUCfQz05xZvDNqtTD/0y7z 03XEOuGevejbrALQqkP7F359XG2njtK0foonHolsDnMQir6yJwP/IjrO/etBSLcqelTg J1oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=UUwJs4P1DqFLb+/9QcgvuwdxLm4ikSjENMblrccvMV8=; b=Zi/IG82lqFf551f9OXebhO9SSHuU465cMpF3R/I3+15er2g2NtXZIFCslQkQ36tg+e HQFCMKxTlkOEnq96chDYfMHyiRobIc3xSBYVs+UOPge6Imzdl520N4Jb3U4DncABAxzf eO304zCmJmWx+5LhxHtdHFw/GQRd7KZmsh/WPXXGhBliSZXNQirkNCsh0rbo8Fiq8vRn UmbQenlv6V0cVMkMsKNNYQH2AY/mhFsJFEvfWrFmzetWbI3edp886a0GkiH9nD9poxjH AMKQkbgv9T582HMHUC3AmBE3JQfhxtKl3l3AWaLgRQCppFFq+gCttWnt4jmecGkqddif MMeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si445665eji.610.2020.09.28.04.46.15; Mon, 28 Sep 2020 04:46:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbgI1LpA (ORCPT + 99 others); Mon, 28 Sep 2020 07:45:00 -0400 Received: from foss.arm.com ([217.140.110.172]:50032 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbgI1Lo7 (ORCPT ); Mon, 28 Sep 2020 07:44:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 703FE113E; Mon, 28 Sep 2020 04:44:58 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D7BF63F6CF; Mon, 28 Sep 2020 04:44:56 -0700 (PDT) From: Sudeep Holla To: Jassi Brar , Jassi Brar , Viresh Kumar , ALKML , DTML , LKML Cc: Sudeep Holla , Vincent Guittot , Frank Rowand , Bjorn Andersson , Rob Herring , Rob Herring Subject: [PATCH 3/4] mailbox: arm_mhu: Match only if compatible is "arm,mhu" Date: Mon, 28 Sep 2020 12:44:44 +0100 Message-Id: <20200928114445.19689-4-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200928114445.19689-1-sudeep.holla@arm.com> References: <20200928114445.19689-1-sudeep.holla@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since we will be soon adding a separate driver based on this ARM MHU driver to support doorbell mode, let us add explicit check to match the default compatible for this driver. This is needed as the probe and match reuses the AMBA device ids currently and don't have any explicit compatible check. Signed-off-by: Sudeep Holla --- drivers/mailbox/arm_mhu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mailbox/arm_mhu.c b/drivers/mailbox/arm_mhu.c index 9da236552bd7..b7fbf276eb62 100644 --- a/drivers/mailbox/arm_mhu.c +++ b/drivers/mailbox/arm_mhu.c @@ -113,6 +113,9 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id) struct device *dev = &adev->dev; int mhu_reg[MHU_CHANS] = {MHU_LP_OFFSET, MHU_HP_OFFSET, MHU_SEC_OFFSET}; + if (!of_device_is_compatible(dev->of_node, "arm,mhu")) + return -ENODEV; + /* Allocate memory for device */ mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL); if (!mhu) -- 2.17.1