From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754577AbdKIVOj (ORCPT ); Thu, 9 Nov 2017 16:14:39 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:47203 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753088AbdKIVOi (ORCPT ); Thu, 9 Nov 2017 16:14:38 -0500 X-Google-Smtp-Source: ABhQp+TrxiPU4vY2PwlT+9kCRdcuXY6TDOQHZy7bKEhK+70WJ/WpydsTN47X5yfxKm1C1CcMYu/Yxg== Subject: Re: [PATCH 10/14] soundwire: Add sysfs for SoundWire DisCo properties To: Vinod Koul , Greg Kroah-Hartman Cc: LKML , ALSA , Mark , Takashi , Pierre , Sanyog Kale , Shreyas NC , patches.audio@intel.com, alan@linux.intel.com, Charles Keepax , Sagar Dharia , plai@codeaurora.org, Sudheer Papothi References: <1508382211-3154-1-git-send-email-vinod.koul@intel.com> <1508382211-3154-11-git-send-email-vinod.koul@intel.com> From: Srinivas Kandagatla Message-ID: <1e82021b-a721-b0a3-6586-cee0077f865a@linaro.org> Date: Thu, 9 Nov 2017 21:14:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1508382211-3154-11-git-send-email-vinod.koul@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/10/17 04:03, Vinod Koul wrote: > It helps to read the properties for understanding and debug > SoundWire systems, so add sysfs files for SoundWire DisCo > properties. > > TODO: Add ABI files for sysfs > > Signed-off-by: Sanyog Kale > Signed-off-by: Vinod Koul > --- > diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c > index 6c4f41b64744..e3d7aea18892 100644 > --- a/drivers/soundwire/bus.c > +++ b/drivers/soundwire/bus.c > @@ -90,6 +90,8 @@ int sdw_add_bus_master(struct sdw_bus *bus) > } > } > > + sdw_sysfs_bus_init(bus); > + > /* > * SDW is an enumerable bus, but devices can be powered off. So, > * they won't be able to report as present. > @@ -119,6 +121,8 @@ static int sdw_delete_slave(struct device *dev, void *data) > struct sdw_slave *slave = dev_to_sdw_dev(dev); > struct sdw_bus *bus = slave->bus; > > + sdw_sysfs_slave_exit(slave); > + > mutex_lock(&bus->bus_lock); > if (!list_empty(&bus->slaves)) > list_del(&slave->node); > @@ -130,6 +134,7 @@ static int sdw_delete_slave(struct device *dev, void *data) > > void sdw_delete_bus_master(struct sdw_bus *bus) > { > + sdw_sysfs_bus_init(bus); Shouldn't this be sdw_sysfs_bus_exit() here? > device_for_each_child(bus->dev, NULL, sdw_delete_slave); > }