soundwire: sysfs: have the driver core handle the creation of the device groups
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Jan 2024 18:46:30 +0000 (10:46 -0800)
committerVinod Koul <vkoul@kernel.org>
Thu, 28 Mar 2024 18:08:47 +0000 (23:38 +0530)
commitfc7e56017b51482f1b9da2e778eedb4bd1deb6b3
tree48e6fbde729a97a49abce8527586c8704036fdaa
parent3ee43f7cc9841cdf3f2bec2de4b1e729fd17e303
soundwire: sysfs: have the driver core handle the creation of the device groups

The driver core supports the ability to handle the creation and removal
of device-specific sysfs files in a race-free manner.  Take advantage of
that by converting this driver to use this by moving the sysfs
attributes into a group and assigning the dev_groups pointer to it.

Cc: Vinod Koul <vkoul@kernel.org>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Sanyog Kale <sanyog.r.kale@intel.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-By: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/2024013030-worsening-rocket-a3cb@gregkh
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/bus_type.c
drivers/soundwire/sysfs_local.h
drivers/soundwire/sysfs_slave.c