Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp899163imu; Fri, 21 Dec 2018 09:07:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN7HaHWHrenCwuRgL1EM23COoDFqJSiNTtoAaGfXmjqiKKFcwsUl3U34SmquGCdz/krYWqEB X-Received: by 2002:a63:4b60:: with SMTP id k32mr3152148pgl.186.1545412062493; Fri, 21 Dec 2018 09:07:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545412062; cv=none; d=google.com; s=arc-20160816; b=e81COuX7xSUPMs84g/JiDPFuogi0GW+LO2EuX5XY0q2uRInoQLtm25j6CgvshD5VLi YtehiyePYbRaphuen8PL63akSG/RWZcXphDQE1Bc+mDkr55bLi0aqJ2wUl5O8xvzmfHp RG/NRz71HU46FzIsaYntXkSwdKT3gqS7rGXV5l8qETuJgIHLUBA7ybjg5Pma9oqYZ1zN 01CEAMQAmd4vwCIGRFQuXnX/DZjPaVzIQJLWVuT9kJGIDTNnSU78omMEdrKH8GGSTGr6 BR0xP1pNUCCLHJkkrQ73/SV3gzO0/Lmge3Hv/HED3FMs8F9SKjhFwtfHPbkr3O3Mo5j2 dzTg== 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=Tmvy8cVLJs3wqoeJRXB085alk1K8vF2QjLBFQIe0SvM=; b=KVvgt9pefB+oKosfglAaKUu5LsdS0F4/lfGBe8AkfV8LCslJVy33tMWc7yPv4ihFO+ 3d3QAtvibu8cTiD9BDPH4jlj5hH+ve1JmXgP6GAt2zYGzIkVNG3Sk+GMxpy+JdTvnLaN Hxrd4u1yPOMqtUz71dpHGIOOJr5wtrbTWeWmsLo4jAcuI0WV2cYjHDJmG9Rxy9nPImt/ bH/MOv/MH+vZxhLegCFTUjWSCtkYER0Wl+KogssvlMW0eNtjJqJ/8Ex6EM5OlKP9HD+N 4I5gauwuzYLEjkI8B02SCr82UvyQ+XlNYKZx6QnFUw7nBObgHJUaRNaVNT62zeppknCI OXxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KLJCrX87; 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 w32si20555590pga.337.2018.12.21.09.07.26; Fri, 21 Dec 2018 09:07:42 -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=@kernel.org header.s=default header.b=KLJCrX87; 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 S1733126AbeLUHzK (ORCPT + 99 others); Fri, 21 Dec 2018 02:55:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:59456 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733027AbeLUHzK (ORCPT ); Fri, 21 Dec 2018 02:55:10 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D11F421908; Fri, 21 Dec 2018 07:55:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545378909; bh=fJsca7QpwGofdW2eDgslOkt1H5yD/LOf+1IJwsgQQoA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KLJCrX872yg9TtxVkiYqMBm1OzledK53KpPc7ojyq5KAmWpf3F/4ZieR2033G8YEd RbnaxEmMZey/5b6ha5uR5uYTe8YQbNwzICFjLY3uGVC9AT9NuCQnAk+/dyrJqEJrTO 2oqFT/ClvqhmX5B5x1VPUFLJal7RD1FX4cMSmujM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH 07/10] driver core: bus: convert to use BUS_ATTR_WO and RW Date: Fri, 21 Dec 2018 08:54:39 +0100 Message-Id: <20181221075442.17109-8-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181221075442.17109-1-gregkh@linuxfoundation.org> References: <20181221075442.17109-1-gregkh@linuxfoundation.org> 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 We are trying to get rid of BUS_ATTR() and the usage of that in bus.c can be trivially converted to use BUS_ATTR_WO and RW, so use those macros instead. Cc: "Rafael J. Wysocki" Signed-off-by: Greg Kroah-Hartman --- drivers/base/bus.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 8bfd27ec73d6..f10d56c61a46 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -233,12 +233,12 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf, } static DRIVER_ATTR_WO(bind); -static ssize_t show_drivers_autoprobe(struct bus_type *bus, char *buf) +static ssize_t drivers_autoprobe_show(struct bus_type *bus, char *buf) { return sprintf(buf, "%d\n", bus->p->drivers_autoprobe); } -static ssize_t store_drivers_autoprobe(struct bus_type *bus, +static ssize_t drivers_autoprobe_store(struct bus_type *bus, const char *buf, size_t count) { if (buf[0] == '0') @@ -248,7 +248,7 @@ static ssize_t store_drivers_autoprobe(struct bus_type *bus, return count; } -static ssize_t store_drivers_probe(struct bus_type *bus, +static ssize_t drivers_probe_store(struct bus_type *bus, const char *buf, size_t count) { struct device *dev; @@ -583,9 +583,8 @@ static void remove_bind_files(struct device_driver *drv) driver_remove_file(drv, &driver_attr_unbind); } -static BUS_ATTR(drivers_probe, S_IWUSR, NULL, store_drivers_probe); -static BUS_ATTR(drivers_autoprobe, S_IWUSR | S_IRUGO, - show_drivers_autoprobe, store_drivers_autoprobe); +static BUS_ATTR_WO(drivers_probe); +static BUS_ATTR_RW(drivers_autoprobe); static int add_probe_files(struct bus_type *bus) { -- 2.20.1