mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Andrew Ijano" <andrew.ijano@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>
Subject: Re: [PATCH next v2] iio: sca3000: simplify with spi_get_device_match_data()
Date: Fri, 20 Feb 2026 17:15:03 +0530	[thread overview]
Message-ID: <a85cc647-16ec-4b02-babf-0129e300a852@oracle.com> (raw)
In-Reply-To: <20260220105001.7fce6c3c@jic23-huawei>

Hi Jonathan,

On 20/02/26 16:21, Jonathan Cameron wrote:
> On Mon, 16 Feb 2026 02:24:48 -0800
> Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> wrote:
> 
>> Refactor each sca3000 variant with it's own chip_info struct, update the
>> sca3000_probe() to use spi_get_device_match_data().
>>
>> Suggested-by: David Lechner <dlechner@baylibre.com>
>> Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
>> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
> 
> I made a couple of white space tweaks whilst applying.
> 
> Applied to the testing branch of iio.git.  There was quite
> a bit of fuzz (line changes) but was all straight forward.
> 

Oh, sorry for that. Maybe because these patches: 
https://lore.kernel.org/all/20260205195845.4e108117@jic23-huawei/ were 
not present ?

I don't see them here: 
https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/log/drivers/iio/accel/sca3000.c?h=testing 
, so asking.

This patch might have applied cleaner with the above series applied.


> thanks,
> 
> Jonathan
> 
>> ---
>> Only compile tested.
>>
>> v1->v2: Andy suggested we drop a NULL check on
>> spi_get_device_match_data() failure. Also added Andy's RB.
>> ---
>>   drivers/iio/accel/sca3000.c | 127 +++++++++++++++++-------------------
>>   1 file changed, 59 insertions(+), 68 deletions(-)
>>
>> diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
>> index d4c117f54a07..eeb313056259 100644
>> --- a/drivers/iio/accel/sca3000.c
>> +++ b/drivers/iio/accel/sca3000.c
>> @@ -172,6 +172,7 @@ struct sca3000_state {
>>   
...
>>   
>>   static const struct spi_device_id sca3000_id[] = {
>> -	{"sca3000_d01", d01},
>> -	{"sca3000_e02", e02},
>> -	{"sca3000_e04", e04},
>> -	{"sca3000_e05", e05},
>> +	{"sca3000_d01", (kernel_ulong_t)&sca3000_chip_info_d01},
>> +	{"sca3000_e02", (kernel_ulong_t)&sca3000_chip_info_e02},
>> +	{"sca3000_e04", (kernel_ulong_t)&sca3000_chip_info_e04},
>> +	{"sca3000_e05", (kernel_ulong_t)&sca3000_chip_info_e05},
> Similarly let's add some spaces to these.
> 

I didn't add the space mostly because there were not there before. Will 
check for other similar drivers next time, thanks a lot for dealing with 
them by yourself.


Thanks,
Harshit

>>   	{ }
>>   };
>>   MODULE_DEVICE_TABLE(spi, sca3000_id);
> 


  reply	other threads:[~2026-02-20 11:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 10:24 Harshit Mogalapalli
2026-02-20 10:51 ` Jonathan Cameron
2026-02-20 11:45   ` Harshit Mogalapalli [this message]
2026-02-24 16:23     ` Harshit Mogalapalli

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=a85cc647-16ec-4b02-babf-0129e300a852@oracle.com \
    --to=harshit.m.mogalapalli@oracle.com \
    --cc=andrew.ijano@gmail.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.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

all inboxes | Powered by JetHome®