Re: [PATCH v3 14/24] iio: accel: kxcjk-1013: Get rid of enum kx_chipset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 26, 2024 at 12:37:36PM +0100, Jonathan Cameron wrote:
> On Thu, 24 Oct 2024 22:05:03 +0300
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> 
> > Instead of using enum, out of which only a couple of values
> > are being actully used, make a comparisons against pointer
> > to the respective chip_info structures.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Hmm. Maybe worth a revisit longer term to use callbacks for the
> decisions instead of matching at all as this stuff tends not to end
> up being specific to one version of a chip as more parts are added.

As already mentioned in another reply, yes, the callbacks is the future.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux