Attention is currently required from: Alexander Goncharov.
5 comments:
File ni845x_spi.c:
Patch Set #2, Line 228: uInt32 device_handle
I thought the purpose of the first patch in the chain CB:72154 is to do this type of work: adding arguments to functions and passing values as arguments instead of using globals?
Is there a reason why this specific diff, adding `uInt32 device_handle` as an argument to `usb8452_spi_set_io_voltage` cannot be done in CB:72154 ?
These are actually arguments, not global data
Patch Set #2, Line 575: uInt32 device_handle
`device_handle` declared as `Int32` in the `ni845x_spi_data` struct
You won't need previous patch CB:72159 if you do:
1) allocate data here, and use data->member_name from here and below
2) add `free(data)` in shutdown function
3) call shutdown function with `data` in `err:` label branch
Also it would be consistent with other programmers, all of them which have data struct they free data in shutdown function.
what do you think?
and now you need to pass `data` here, now you have data!
To view, visit change 72160. To unsubscribe, or for help writing mail filters, visit settings.