Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp420919imu; Fri, 21 Dec 2018 01:11:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN4P3qo7WkmcgyRTSUh5Cok8efNiWBhQK1MJV0475oSfwbf+agxDC8ZP67nmVk+1dKpXGZ5A X-Received: by 2002:a63:6cc:: with SMTP id 195mr1598299pgg.401.1545383519793; Fri, 21 Dec 2018 01:11:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545383519; cv=none; d=google.com; s=arc-20160816; b=TX6fwfbq/hzJzlZbBpelszIpOldorVndRvZxpoFAe6EKBt07IxN9Xw+0KQ/2DUmg+N l2mju3x5kTRCOlrgtG2uaPOzrnA3JGjAaSvOTRiI1pDOGHE/odJ2oiphGwtNzs4rdviA sJRm4VrQeioUYhWVGrNMhAlUPjewfkV8/iqcGf0FQGdHN3+fX66FhyCjH8h5OSiTQKJD zqSgp/3rdA7Djm7YMtL17n2hxJAJN2+7XTjzwVavO4Xq9npDd6e5XHCvsC0BFhFPk4t5 8dPVUFz9Id/6duh45LkrEMN582Xp5glxCA5cYyzLEt8Wve8nam1yVjltQdHcADrJIH2k YINA== 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=sdbdc6fLb1uUkzPeNxCoPmTHfLmGNoyFhYbBeqePZaM=; b=O7RY+eMY311byDJHl/yF73MCzzkWImb5cXElKhGbEUcxUVh3sFAhUGAAZUGXd8EVqy LRK3ExOkTIuY9bABt/3puK48dB2gJu1yUCug76PMhVB/jhQx+UhS0mky4+Zwny9O1OO/ 2Ss3QGlmp+QtYyrpXq6GX9RbFfz1vAelX2YlPygVcBC/yiCrL+4/iQ3MYvQ3UEx0YHvr c8XxWqsvx17zn9jbs8nYd+BxYpj3/3niWCiSLQTOSksEs8K0QTWmIGO4jDVMLUxjF3tv 5Nre5gq2fvd8baI8P50XrOG/nD2O7C+6RAIpyf4WerxnvFK6+LVLEs8NBF7DOqEmVdBb KDKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="iD/Rds6G"; 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 x9si1005198pll.131.2018.12.21.01.11.44; Fri, 21 Dec 2018 01:11:59 -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="iD/Rds6G"; 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 S2387403AbeLUHzQ (ORCPT + 99 others); Fri, 21 Dec 2018 02:55:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:59556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730539AbeLUHzP (ORCPT ); Fri, 21 Dec 2018 02:55:15 -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 2F41821908; Fri, 21 Dec 2018 07:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545378914; bh=l37aqJNOKxj4jj6KYPCR6moiZ8hIl9Ypibh5fz8YXss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iD/Rds6GahO4OnDak9qUcYispzLapbGi+cswsHosF4azQGZ0er5EPDFlOpBZ2YIov UuWaMJWhB6csKuQm1phJ4Igag5Zu0ZCCJvsHRTlJC+0wg1l1fvXWRX/pMbJKKs10gM q5nG/v1Py93ER5/pTtM+15iDA6QPOK8lnEfT4leU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH 09/10] driver core: drop use of BUS_ATTR() Date: Fri, 21 Dec 2018 08:54:41 +0100 Message-Id: <20181221075442.17109-10-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() so drop the last user of it from the tree. We had to "open code" it in order to prevent a function name conflict due to the use of DEVICE_ATTR_WO() earlier in the file :( Cc: "Rafael J. Wysocki" Signed-off-by: Greg Kroah-Hartman --- drivers/base/bus.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/base/bus.c b/drivers/base/bus.c index f10d56c61a46..575bd6d752bd 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -830,7 +830,14 @@ static ssize_t bus_uevent_store(struct bus_type *bus, kobject_synth_uevent(&bus->p->subsys.kobj, buf, count); return count; } -static BUS_ATTR(uevent, S_IWUSR, NULL, bus_uevent_store); +/* + * "open code" the old BUS_ATTR() macro here. We want to use BUS_ATTR_WO() + * here, but can not use it as earlier in the file we have + * DEVICE_ATTR_WO(uevent), which would cause a clash with the with the store + * function name. + */ +static struct bus_attribute bus_attr_uevent = __ATTR(uevent, S_IWUSR, NULL, + bus_uevent_store); /** * bus_register - register a driver-core subsystem -- 2.20.1