public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: zhong jiang <zhongjiang@huawei.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: wfx: fix an undefined reference error when CONFIG_MMC=m
Date: Fri, 11 Oct 2019 15:55:14 +0000	[thread overview]
Message-ID: <25343442.QKQdTnp5z4@pc-42> (raw)
In-Reply-To: <5DA0A4F4.4050103@huawei.com>

On Friday 11 October 2019 17:51:29 CEST zhong jiang wrote:
[...]
> How about the following patch ?
> 
> diff --git a/drivers/staging/wfx/Makefile b/drivers/staging/wfx/Makefile
> index 0d9c1ed..77d68b7 100644
> --- a/drivers/staging/wfx/Makefile
> +++ b/drivers/staging/wfx/Makefile
> @@ -19,6 +19,6 @@ wfx-y := \
>         sta.o \
>         debug.o
>  wfx-$(CONFIG_SPI) += bus_spi.o
> -wfx-$(subst m,y,$(CONFIG_MMC)) += bus_sdio.o
> +wfx-$(CONFIG_MMC) += bus_sdio.o
> 
>  obj-$(CONFIG_WFX) += wfx.o
> diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c
> index d2508bc..26720a4 100644
> --- a/drivers/staging/wfx/main.c
> +++ b/drivers/staging/wfx/main.c
> @@ -484,16 +484,19 @@ static int __init wfx_core_init(void)
> 
>         if (IS_ENABLED(CONFIG_SPI))
>                 ret = spi_register_driver(&wfx_spi_driver);
> -       if (IS_ENABLED(CONFIG_MMC) && !ret)
> +#ifdef CONFIG_MMC
> +       if (!ret)
>                 ret = sdio_register_driver(&wfx_sdio_driver);
> +#endif
>         return ret;
>  }
>  module_init(wfx_core_init);
> 
>  static void __exit wfx_core_exit(void)
>  {
> -       if (IS_ENABLED(CONFIG_MMC))
> -               sdio_unregister_driver(&wfx_sdio_driver);
> +#ifdef CONFIG_MMC
> +       sdio_unregister_driver(&wfx_sdio_driver);
> +#endif
>         if (IS_ENABLED(CONFIG_SPI))
>                 spi_unregister_driver(&wfx_spi_driver);
>  }
Hello zhong,

Can you also check the case where CONFIG_SPI is not set?

Thank you,

-- 
Jérôme Pouiller


  reply	other threads:[~2019-10-11 15:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11  3:02 [PATCH] staging: wfx: fix an undefined reference error when CONFIG_MMC=m zhong jiang
2019-10-11  4:26 ` Greg KH
2019-10-11  6:20   ` zhong jiang
2019-10-11  8:40   ` Jerome Pouiller
2019-10-11  9:02     ` Greg KH
2019-10-11 14:48       ` zhong jiang
2019-10-11 15:51       ` zhong jiang
2019-10-11 15:55         ` Jerome Pouiller [this message]
2019-10-11 16:13           ` zhong jiang
2019-10-11 16:16         ` Greg KH
2019-10-11 16:24           ` zhong jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25343442.QKQdTnp5z4@pc-42 \
    --to=jerome.pouiller@silabs.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhongjiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox