Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp706577ybx; Tue, 5 Nov 2019 04:21:57 -0800 (PST) X-Google-Smtp-Source: APXvYqwOtNLX4RD0+B67zyU/MBGklCYIq+84PsOgYpf7kzkEyzFvk4Xs8uq9YfZ/PJlScz1TzzJL X-Received: by 2002:a50:ac2c:: with SMTP id v41mr34646345edc.11.1572956517296; Tue, 05 Nov 2019 04:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572956517; cv=none; d=google.com; s=arc-20160816; b=haqhrJN6jBvKmd+PnqmOKexMthu/zus5Nb9zlmlEhU7N27Lc95CBkkhSdpmSRSCuEp weYUUKdC9lPrq2pOePMl9gKqge8h0kL55rG27MylRJqbfSo0GLYmFTUHGBGGN16uF464 CE4oNjFqmPlSKYvsB68lcvz+87lSBONOGG89KJ7fKCnR4iL7Sxupu73CpWGi1lzjz1f4 PQkH3HRwdhOqm5rfTBwxurfHktK3HFsOp51x2Dz0H8ESQ/npQVeGKnbTx/NFClkBpw8l B0i6NGkGk1cDXfvVBdYAH1tLT2sEVc6hSKrexsN65aqJi5ezXMJosXqZMoJZ6PAFHvwG d8Hw== 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 :message-id:date:subject:cc:to:from; bh=eBYd374lL8g8GOhSDuO695AZ8JoZGNnmtz/WD3ge3OU=; b=vB/qZlXLHS3OUn0Np6KBh1YI//hWzjNixUoEh1OBV0rxTXuABzWRUVQiLQXNABx1fp ODRUQUK6Q/KG5zn0C7XahUxZA7szIFIIpIvfrM6EAj8kL6iUrgv4MktCnrgkpjs/X0gS 0LUgHBmyV6klUD2VYZLHv4H87nzZTeoc9SJ7NaaSq2Oq83FecGZ2lgIf3//xt/xKFrGK 10QcMPywrna7C0IthC+Wckd87k6KdKNSbJJT3iWhLf3HlAmrQzn8Jop4znpNXV0wDxup ytMMjIabsLCD2VSOGYcD/lE735EbJxIqVAddTyxkIUHv8G/QJPoMhFvija2KqiBsJ1rI b/lw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g27si9011988ejc.219.2019.11.05.04.21.33; Tue, 05 Nov 2019 04:21:57 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730911AbfKEMTi (ORCPT + 99 others); Tue, 5 Nov 2019 07:19:38 -0500 Received: from mga09.intel.com ([134.134.136.24]:9770 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726612AbfKEMTi (ORCPT ); Tue, 5 Nov 2019 07:19:38 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2019 04:19:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,271,1569308400"; d="scan'208";a="200359807" Received: from twinkler-lnx.jer.intel.com ([10.12.91.155]) by fmsmga008.fm.intel.com with ESMTP; 05 Nov 2019 04:19:34 -0800 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Tomas Winkler Subject: [char-misc 1/2] mei: bus: prefix device names on bus with the bus name Date: Tue, 5 Nov 2019 17:05:13 +0200 Message-Id: <20191105150514.14010-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.21.0 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 From: Alexander Usyskin Add parent device name to the name of devices on bus to avoid device names collisions for same client UUID available from different MEI heads. Namely this prevents sysfs collision under /sys/bus/mei/device/ In the device part leave just UUID other parameters that are required for device matching are not required here and are just bloating the name. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 985bd4fd3328..53bb394ccba6 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c @@ -873,15 +873,16 @@ static const struct device_type mei_cl_device_type = { /** * mei_cl_bus_set_name - set device name for me client device + * - + * Example: 0000:00:16.0-55213584-9a29-4916-badf-0fb7ed682aeb * * @cldev: me client device */ static inline void mei_cl_bus_set_name(struct mei_cl_device *cldev) { - dev_set_name(&cldev->dev, "mei:%s:%pUl:%02X", - cldev->name, - mei_me_cl_uuid(cldev->me_cl), - mei_me_cl_ver(cldev->me_cl)); + dev_set_name(&cldev->dev, "%s-%pUl", + dev_name(cldev->bus->dev), + mei_me_cl_uuid(cldev->me_cl)); } /** -- 2.21.0