From patchwork Fri Aug 27 15:05:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 503850 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, 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 681B1C43214 for ; Fri, 27 Aug 2021 15:02:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4508760EFF for ; Fri, 27 Aug 2021 15:02:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245391AbhH0PDI (ORCPT ); Fri, 27 Aug 2021 11:03:08 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:8790 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245369AbhH0PDI (ORCPT ); Fri, 27 Aug 2021 11:03:08 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Gx2wv5Mn6zYthf; Fri, 27 Aug 2021 23:01:35 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 27 Aug 2021 23:02:11 +0800 Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 27 Aug 2021 23:02:11 +0800 From: Kefeng Wang To: , , , , CC: , , , Kefeng Wang Subject: [PATCH v2 3/4] amba: Kill sysfs attribute file of irq Date: Fri, 27 Aug 2021 23:05:59 +0800 Message-ID: <20210827150600.78811-4-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210827150600.78811-1-wangkefeng.wang@huawei.com> References: <20210827150600.78811-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org As Rob said[1], there doesn't seem to be any users about the sysfs attribute file of irq[0] and irq[1]. And we don't need to include as NO_IRQ has gone. Let's kill both of them. [1] https://lkml.org/lkml/2021/8/25/461 Signed-off-by: Kefeng Wang Acked-by: Rob Herring --- drivers/amba/bus.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 37fcd5592c6f..4d3a565ca079 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -20,8 +20,6 @@ #include #include -#include - #define to_amba_driver(d) container_of(d, struct amba_driver, drv) /* called on periphid match and class 0x9 coresight device. */ @@ -135,8 +133,6 @@ static ssize_t name##_show(struct device *_dev, \ static DEVICE_ATTR_RO(name) amba_attr_func(id, "%08x\n", dev->periphid); -amba_attr_func(irq0, "%u\n", dev->irq[0]); -amba_attr_func(irq1, "%u\n", dev->irq[1]); amba_attr_func(resource, "\t%016llx\t%016llx\t%016lx\n", (unsigned long long)dev->res.start, (unsigned long long)dev->res.end, dev->res.flags); @@ -463,20 +459,10 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent) skip_probe: ret = device_add(&dev->dev); - if (ret) - goto err_release; - - if (dev->irq[0]) - ret = device_create_file(&dev->dev, &dev_attr_irq0); - if (ret == 0 && dev->irq[1]) - ret = device_create_file(&dev->dev, &dev_attr_irq1); - if (ret == 0) - return ret; - - device_unregister(&dev->dev); err_release: - release_resource(&dev->res); + if (ret) + release_resource(&dev->res); err_out: return ret;