[PATCH] thermal/drivers/qcom/spmi-mbg-tm: Import IIO_CONSUMER namespace

Shawn Guo posted 1 patch 1 month ago
drivers/thermal/qcom/qcom-spmi-mbg-tm.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] thermal/drivers/qcom/spmi-mbg-tm: Import IIO_CONSUMER namespace
Posted by Shawn Guo 1 month ago
The IIO consumer interface symbols moved into the IIO_CONSUMER namespace,
so consumers must import it explicitly.  Without it modpost fails on
'iio_read_channel_processed' and 'devm_iio_channel_get':

  ERROR: modpost: drivers/thermal/qcom/qcom-spmi-mbg-tm.ko: module uses
  symbol 'iio_read_channel_processed' from namespace 'IIO_CONSUMER', but
  does not import it.

Fixes: ebf1d03dab96 ("iio: inkern: Use namespaced exports")
Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
---
 drivers/thermal/qcom/qcom-spmi-mbg-tm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thermal/qcom/qcom-spmi-mbg-tm.c b/drivers/thermal/qcom/qcom-spmi-mbg-tm.c
index 0492d5eeca01..012eb2a5f31f 100644
--- a/drivers/thermal/qcom/qcom-spmi-mbg-tm.c
+++ b/drivers/thermal/qcom/qcom-spmi-mbg-tm.c
@@ -252,5 +252,6 @@ static struct platform_driver mbg_tm_driver = {
 };
 module_platform_driver(mbg_tm_driver);
 
+MODULE_IMPORT_NS("IIO_CONSUMER");
 MODULE_DESCRIPTION("PMIC MBG Temperature monitor driver");
 MODULE_LICENSE("GPL");
-- 
2.43.0
Re: [PATCH] thermal/drivers/qcom/spmi-mbg-tm: Import IIO_CONSUMER namespace
Posted by Andy Shevchenko 1 month ago
On Thu, Aug 27, 2026 at 06:35:55PM +0800, Shawn Guo wrote:
> The IIO consumer interface symbols moved into the IIO_CONSUMER namespace,
> so consumers must import it explicitly.  Without it modpost fails on

> 'iio_read_channel_processed' and 'devm_iio_channel_get':

iio_read_channel_processed()
devm_iio_channel_get()

>   ERROR: modpost: drivers/thermal/qcom/qcom-spmi-mbg-tm.ko: module uses
>   symbol 'iio_read_channel_processed' from namespace 'IIO_CONSUMER', but
>   does not import it.

> Fixes: ebf1d03dab96 ("iio: inkern: Use namespaced exports")

Shouldn't this be backported to stable kernels?

...

Code wise looks good.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH] thermal/drivers/qcom/spmi-mbg-tm: Import IIO_CONSUMER namespace
Posted by Shawn Guo 1 month ago
On Thu, Aug 27, 2026 at 03:52:42PM +0300, Andy Shevchenko wrote:
> On Thu, Aug 27, 2026 at 06:35:55PM +0800, Shawn Guo wrote:
> > The IIO consumer interface symbols moved into the IIO_CONSUMER namespace,
> > so consumers must import it explicitly.  Without it modpost fails on
> 
> > 'iio_read_channel_processed' and 'devm_iio_channel_get':
> 
> iio_read_channel_processed()
> devm_iio_channel_get()

Sure, will update.

> 
> >   ERROR: modpost: drivers/thermal/qcom/qcom-spmi-mbg-tm.ko: module uses
> >   symbol 'iio_read_channel_processed' from namespace 'IIO_CONSUMER', but
> >   does not import it.
> 
> > Fixes: ebf1d03dab96 ("iio: inkern: Use namespaced exports")
> 
> Shouldn't this be backported to stable kernels?

The offending commit just landed on mainline during this merge window.
So there is no stable kernels concerned by this.

> 
> ...
> 
> Code wise looks good.

Thank you for the review!

Shawn
Re: [PATCH] thermal/drivers/qcom/spmi-mbg-tm: Import IIO_CONSUMER namespace
Posted by Jonathan Cameron 4 weeks, 1 day ago
On Thu, 27 Aug 2026 22:35:27 +0800
Shawn Guo <shengchao.guo@oss.qualcomm.com> wrote:

> On Thu, Aug 27, 2026 at 03:52:42PM +0300, Andy Shevchenko wrote:
> > On Thu, Aug 27, 2026 at 06:35:55PM +0800, Shawn Guo wrote:  
> > > The IIO consumer interface symbols moved into the IIO_CONSUMER namespace,
> > > so consumers must import it explicitly.  Without it modpost fails on  
> >   
> > > 'iio_read_channel_processed' and 'devm_iio_channel_get':  
> > 
> > iio_read_channel_processed()
> > devm_iio_channel_get()  
> 
> Sure, will update.
> 
> >   
> > >   ERROR: modpost: drivers/thermal/qcom/qcom-spmi-mbg-tm.ko: module uses
> > >   symbol 'iio_read_channel_processed' from namespace 'IIO_CONSUMER', but
> > >   does not import it.  
> >   
> > > Fixes: ebf1d03dab96 ("iio: inkern: Use namespaced exports")  
> > 
> > Shouldn't this be backported to stable kernels?  
> 
> The offending commit just landed on mainline during this merge window.
> So there is no stable kernels concerned by this.

There is a fix on the thermal tree. I though that was enough. Maybe this
races with that fix going upstream?

Jonathan

> 
> > 
> > ...
> > 
> > Code wise looks good.  
> 
> Thank you for the review!
> 
> Shawn
Re: [PATCH] thermal/drivers/qcom/spmi-mbg-tm: Import IIO_CONSUMER namespace
Posted by Shawn Guo 4 weeks ago
On Fri, Aug 28, 2026 at 11:42:49PM +0100, Jonathan Cameron wrote:
> On Thu, 27 Aug 2026 22:35:27 +0800
> Shawn Guo <shengchao.guo@oss.qualcomm.com> wrote:
> 
> > On Thu, Aug 27, 2026 at 03:52:42PM +0300, Andy Shevchenko wrote:
> > > On Thu, Aug 27, 2026 at 06:35:55PM +0800, Shawn Guo wrote:  
> > > > The IIO consumer interface symbols moved into the IIO_CONSUMER namespace,
> > > > so consumers must import it explicitly.  Without it modpost fails on  
> > >   
> > > > 'iio_read_channel_processed' and 'devm_iio_channel_get':  
> > > 
> > > iio_read_channel_processed()
> > > devm_iio_channel_get()  
> > 
> > Sure, will update.
> > 
> > >   
> > > >   ERROR: modpost: drivers/thermal/qcom/qcom-spmi-mbg-tm.ko: module uses
> > > >   symbol 'iio_read_channel_processed' from namespace 'IIO_CONSUMER', but
> > > >   does not import it.  
> > >   
> > > > Fixes: ebf1d03dab96 ("iio: inkern: Use namespaced exports")  
> > > 
> > > Shouldn't this be backported to stable kernels?  
> > 
> > The offending commit just landed on mainline during this merge window.
> > So there is no stable kernels concerned by this.
> 
> There is a fix on the thermal tree. I though that was enough. Maybe this
> races with that fix going upstream?

Ah, I see! That's a fix from Nathan Chancellor. Ignore mine then.

Thanks Jonathan!

Shawn