Re: [PATCH v2 2/2] ALSA: firewire: Make use of ieee1394's .driver_data_ptr
Andy Shevchenko <[email protected]> Mon, 11 May 2026 13:54:36 +0300
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.firewire.devel,gmane.linux.sound |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Mon, May 11, 2026 at 12:45:03PM +0200, Uwe Kleine-König (The Capable Hub) wrote: > Recently struct ieee1394_device_id gained a new member to store a pointer > to driver data. Make use of that to get rid of a bunch of casts. ... > - if (!entry->driver_data) > + if (!entry->driver_data_ptr) > detect_formats = snd_dice_stream_detect_current_formats; > else > - detect_formats = (snd_dice_detect_formats_t)entry->driver_data; > + detect_formats = entry->driver_data_ptr; While at it, it can be swapped for better readability if (entry->driver_data_ptr) detect_formats = entry->driver_data_ptr; else detect_formats = snd_dice_stream_detect_current_formats; -- With Best Regards, Andy Shevchenko