2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-27 03:55:37 +08:00

soundwire updates for 6.9

- Constify sdw_bus and sdw_master_type objects
  - use of rtd helper for better code
  - intel aux device remove redundant assignment
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmX0LhwACgkQfBQHDyUj
 g0cdXA/8DNcS29aL7VozqKlD1ULZQHBLYdrHzQUSQfGBVE/8c57A6VES7IXkUsJ5
 LuXNPTWZmij1k4jnNF35pB2ihdNNBpCvN8KRmSoaNK1/J17NCwhqA6uOZbN0UzZT
 6cZ5x0lveCBHVhpQak64ONZoJgS95k6BZ1pLLG6uq50mtxNg2872naZ3Sd5OZ59E
 3aUOh7UMOGgG9sBZpq9AKYqM3JFiSKH5V8DgRNBgfYL3F2rK1GzoLieNcEPGhtsh
 YKbNsYUsJjjdwsKr1/9IjIdeVvXopeFEPV3+jPuBNlPIQJyDV0CJO2z1l/PD7WWc
 rKA0JF2TxmdCT7ki0e+INiebdCAZ2N5ljPE+xDuWbkwSHtCqeCUVkFsB/mErsGdY
 jGSOrxGyrkRkEnY1s7caDhL7V8Y1uf7SZ0Drj//mWqw/7FGsAJbW83iw0mLJMifH
 SmWmvxNnU033x+ZRMa0vbRd3ODgYaSJaW5UcIxRad9teHe+VxO+b4Ic7oD5Bgj90
 tjP+sbnHFoPORsY8HI1AsA9jQojb5hbXyo7RkD+FBlqPSA2IXEswNxG3OoKaHK76
 266fndX3SAEXAbna3NIYU1BjMo20VXgn2quKhuuk3fVrqBNg7PLuGgyRu/ooAhiT
 Oviou9ii4FuGPjinVu5G4jUq3EaMhEEQypGabYvcKKAF2Faou/8=
 =bsoN
 -----END PGP SIGNATURE-----

Merge tag 'soundwire-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire updates from Vinod Koul:

 - Constify sdw_bus and sdw_master_type objects

 - use of rtd helper for better code

 - intel aux device remove redundant assignment

* tag 'soundwire-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: Use snd_soc_substream_to_rtd() to obtain rtd
  soundwire: constify the struct device_type usage
  soundwire: bus_type: make sdw_bus_type const
  soundwire: intel_auxdevice: remove redundant assignment to variable link_flags
  soundwire: stream: add missing const to Documentation
This commit is contained in:
Linus Torvalds 2024-03-15 12:22:52 -07:00
commit b898db92f1
7 changed files with 11 additions and 13 deletions

View File

@ -324,12 +324,12 @@ framework, this stream state is linked to .hw_params() operation.
int sdw_stream_add_master(struct sdw_bus * bus,
struct sdw_stream_config * stream_config,
struct sdw_ports_config * ports_config,
const struct sdw_ports_config * ports_config,
struct sdw_stream_runtime * stream);
int sdw_stream_add_slave(struct sdw_slave * slave,
struct sdw_stream_config * stream_config,
struct sdw_ports_config * ports_config,
const struct sdw_ports_config * ports_config,
struct sdw_stream_runtime * stream);

View File

@ -72,7 +72,7 @@ int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env)
return 0;
}
struct bus_type sdw_bus_type = {
const struct bus_type sdw_bus_type = {
.name = "soundwire",
.match = sdw_bus_match,
};

View File

@ -621,8 +621,6 @@ static int __maybe_unused intel_resume(struct device *dev)
return 0;
}
link_flags = md_flags >> (bus->link_id * 8);
if (pm_runtime_suspended(dev)) {
dev_dbg(dev, "pm_runtime status was suspended, forcing active\n");

View File

@ -112,7 +112,7 @@ static const struct dev_pm_ops master_dev_pm = {
pm_generic_runtime_resume, NULL)
};
struct device_type sdw_master_type = {
const struct device_type sdw_master_type = {
.name = "soundwire_master",
.release = sdw_master_device_release,
.pm = &master_dev_pm,

View File

@ -16,7 +16,7 @@ static void sdw_slave_release(struct device *dev)
kfree(slave);
}
struct device_type sdw_slave_type = {
const struct device_type sdw_slave_type = {
.name = "sdw_slave",
.release = sdw_slave_release,
.uevent = sdw_slave_uevent,

View File

@ -1718,7 +1718,7 @@ EXPORT_SYMBOL(sdw_deprepare_stream);
static int set_stream(struct snd_pcm_substream *substream,
struct sdw_stream_runtime *sdw_stream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_dai *dai;
int ret = 0;
int i;
@ -1771,7 +1771,7 @@ EXPORT_SYMBOL(sdw_alloc_stream);
int sdw_startup_stream(void *sdw_substream)
{
struct snd_pcm_substream *substream = sdw_substream;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct sdw_stream_runtime *sdw_stream;
char *name;
int ret;
@ -1815,7 +1815,7 @@ EXPORT_SYMBOL(sdw_startup_stream);
void sdw_shutdown_stream(void *sdw_substream)
{
struct snd_pcm_substream *substream = sdw_substream;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct sdw_stream_runtime *sdw_stream;
struct snd_soc_dai *dai;

View File

@ -4,9 +4,9 @@
#ifndef __SOUNDWIRE_TYPES_H
#define __SOUNDWIRE_TYPES_H
extern struct bus_type sdw_bus_type;
extern struct device_type sdw_slave_type;
extern struct device_type sdw_master_type;
extern const struct bus_type sdw_bus_type;
extern const struct device_type sdw_slave_type;
extern const struct device_type sdw_master_type;
static inline int is_sdw_slave(const struct device *dev)
{