alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled
@ 2020-10-07 13:57 Cezary Rojewski
  2020-10-07 13:57 ` [PATCH 2/2] ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency Cezary Rojewski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Cezary Rojewski @ 2020-10-07 13:57 UTC (permalink / raw)
  To: alsa-devel
  Cc: pierre-louis.bossart, Cezary Rojewski, rdunlap, lgirdwood, tiwai,
	broonie

module_is_live() is available only when CONFIG_MODULES is enabled.
Replace its usage with try_module_get() which is present regardless of
said config's status.

Fixes: 7a10b66a5df9 ("ASoC: Intel: catpt: Device driver lifecycle")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 sound/soc/intel/catpt/device.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c
index 390ffb203de0..a70179959795 100644
--- a/sound/soc/intel/catpt/device.c
+++ b/sound/soc/intel/catpt/device.c
@@ -81,10 +81,11 @@ static int __maybe_unused catpt_resume(struct device *dev)
 	if (ret)
 		return ret;
 
-	if (!module_is_live(dev->driver->owner)) {
+	if (!try_module_get(dev->driver->owner)) {
 		dev_info(dev, "module unloading, skipping fw boot\n");
 		return 0;
 	}
+	module_put(dev->driver->owner);
 
 	ret = catpt_boot_firmware(cdev, true);
 	if (ret) {
@@ -107,10 +108,12 @@ static int __maybe_unused catpt_resume(struct device *dev)
 
 static int __maybe_unused catpt_runtime_suspend(struct device *dev)
 {
-	if (!module_is_live(dev->driver->owner)) {
+	if (!try_module_get(dev->driver->owner)) {
 		dev_info(dev, "module unloading, skipping suspend\n");
 		return 0;
 	}
+	module_put(dev->driver->owner);
+
 	return catpt_suspend(dev);
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency
  2020-10-07 13:57 [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled Cezary Rojewski
@ 2020-10-07 13:57 ` Cezary Rojewski
  2020-10-07 16:25   ` Randy Dunlap
  2020-10-07 16:26 ` [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled Randy Dunlap
  2020-10-08 22:01 ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Cezary Rojewski @ 2020-10-07 13:57 UTC (permalink / raw)
  To: alsa-devel
  Cc: pierre-louis.bossart, Cezary Rojewski, rdunlap, lgirdwood, tiwai,
	broonie

catpt selects DW_DMAC_CORE which requires DMADEVICES. Fix unmet direct
dependencies warning by updating driver's depends-on list.

Fixes: 6cbfa11d2694 ("ASoC: Intel: Select catpt and deprecate haswell")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 sound/soc/intel/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index 1278bea4e1be..a5b446d5af19 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -21,7 +21,7 @@ config SND_SOC_INTEL_SST
 config SND_SOC_INTEL_CATPT
 	tristate "Haswell and Broadwell"
 	depends on ACPI || COMPILE_TEST
-	depends on SND_DMA_SGBUF
+	depends on DMADEVICES && SND_DMA_SGBUF
 	select DW_DMAC_CORE
 	select SND_SOC_ACPI_INTEL_MATCH
 	help
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency
  2020-10-07 13:57 ` [PATCH 2/2] ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency Cezary Rojewski
@ 2020-10-07 16:25   ` Randy Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2020-10-07 16:25 UTC (permalink / raw)
  To: Cezary Rojewski, alsa-devel
  Cc: lgirdwood, broonie, tiwai, pierre-louis.bossart

On 10/7/20 6:57 AM, Cezary Rojewski wrote:
> catpt selects DW_DMAC_CORE which requires DMADEVICES. Fix unmet direct
> dependencies warning by updating driver's depends-on list.
> 
> Fixes: 6cbfa11d2694 ("ASoC: Intel: Select catpt and deprecate haswell")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  sound/soc/intel/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
> index 1278bea4e1be..a5b446d5af19 100644
> --- a/sound/soc/intel/Kconfig
> +++ b/sound/soc/intel/Kconfig
> @@ -21,7 +21,7 @@ config SND_SOC_INTEL_SST
>  config SND_SOC_INTEL_CATPT
>  	tristate "Haswell and Broadwell"
>  	depends on ACPI || COMPILE_TEST
> -	depends on SND_DMA_SGBUF
> +	depends on DMADEVICES && SND_DMA_SGBUF
>  	select DW_DMAC_CORE
>  	select SND_SOC_ACPI_INTEL_MATCH
>  	help
> 


-- 
~Randy


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled
  2020-10-07 13:57 [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled Cezary Rojewski
  2020-10-07 13:57 ` [PATCH 2/2] ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency Cezary Rojewski
@ 2020-10-07 16:26 ` Randy Dunlap
  2020-10-08 22:01 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2020-10-07 16:26 UTC (permalink / raw)
  To: Cezary Rojewski, alsa-devel
  Cc: lgirdwood, broonie, tiwai, pierre-louis.bossart

On 10/7/20 6:57 AM, Cezary Rojewski wrote:
> module_is_live() is available only when CONFIG_MODULES is enabled.
> Replace its usage with try_module_get() which is present regardless of
> said config's status.
> 
> Fixes: 7a10b66a5df9 ("ASoC: Intel: catpt: Device driver lifecycle")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  sound/soc/intel/catpt/device.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c
> index 390ffb203de0..a70179959795 100644
> --- a/sound/soc/intel/catpt/device.c
> +++ b/sound/soc/intel/catpt/device.c
> @@ -81,10 +81,11 @@ static int __maybe_unused catpt_resume(struct device *dev)
>  	if (ret)
>  		return ret;
>  
> -	if (!module_is_live(dev->driver->owner)) {
> +	if (!try_module_get(dev->driver->owner)) {
>  		dev_info(dev, "module unloading, skipping fw boot\n");
>  		return 0;
>  	}
> +	module_put(dev->driver->owner);
>  
>  	ret = catpt_boot_firmware(cdev, true);
>  	if (ret) {
> @@ -107,10 +108,12 @@ static int __maybe_unused catpt_resume(struct device *dev)
>  
>  static int __maybe_unused catpt_runtime_suspend(struct device *dev)
>  {
> -	if (!module_is_live(dev->driver->owner)) {
> +	if (!try_module_get(dev->driver->owner)) {
>  		dev_info(dev, "module unloading, skipping suspend\n");
>  		return 0;
>  	}
> +	module_put(dev->driver->owner);
> +
>  	return catpt_suspend(dev);
>  }
>  
> 


-- 
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled
  2020-10-07 13:57 [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled Cezary Rojewski
  2020-10-07 13:57 ` [PATCH 2/2] ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency Cezary Rojewski
  2020-10-07 16:26 ` [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled Randy Dunlap
@ 2020-10-08 22:01 ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2020-10-08 22:01 UTC (permalink / raw)
  To: Cezary Rojewski, alsa-devel
  Cc: pierre-louis.bossart, rdunlap, tiwai, lgirdwood

On Wed, 7 Oct 2020 15:57:00 +0200, Cezary Rojewski wrote:
> module_is_live() is available only when CONFIG_MODULES is enabled.
> Replace its usage with try_module_get() which is present regardless of
> said config's status.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled
      commit: f38d43dafb0ccd85034fe22647d353ee8be03ab6
[2/2] ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency
      commit: 56a53ece74e4a5d47f6915f6b81623cec5151f09

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-08 22:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 13:57 [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled Cezary Rojewski
2020-10-07 13:57 ` [PATCH 2/2] ASoC: Intel: catpt: Add explicit DMADEVICES kconfig dependency Cezary Rojewski
2020-10-07 16:25   ` Randy Dunlap
2020-10-07 16:26 ` [PATCH 1/2] ASoC: Intel: catpt: Fix compilation when CONFIG_MODULES is disabled Randy Dunlap
2020-10-08 22:01 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).