Re: [PATCH v2 next 1/5] iio: sca3000: cache SPI device ID in probe
From: Harshit Mogalapalli
Date: Tue Feb 03 2026 - 05:25:09 EST
Hi David,
On 03/02/26 04:31, David Lechner wrote:
On 2/2/26 1:40 PM, Harshit Mogalapalli wrote:
Store the spi_device_id at probe entry and reuse it for the name and
chip info instead of calling spi_get_device_id() repeatedly.
Even better would be to replace spi_get_device_id() with
pi_get_device_match_data() and turn sca3000_spi_chip_info_tbl[]
into individual structs that are used directly as the match
data pointers.
Thanks for the review.
Jonathan also suggested this on v1, but thought of doing this item separate to this patch series(as its a functional change) , would you mind if I do it in a separate patch after this series ?
Reuse the local dev pointer for resource managed helpers. While at it,
reshuffle variable list in a reverse Christmas tree order.
The dev cleanup sounds like a second unrelated change that can be split
out from the spi_get_device_id() changes.
Sure I will separate dev cleanup and device_id extraction into separate patches.
Thanks for the suggestion.
Regards,
Harshit