On Wed, May 01, 2024 at 08:58:19AM +0300, Shahar Avidar wrote:By "higher level" I meant a wrapper function that includes the "class_register" call.
Make use of a higher level API.
What does this mean?
Reducing *global* memory allocation.Reduce global memory allocation from struct class to pointer size.
No, you increased memory allocation here, why do you think you reduced
it?
Also, this looks like a revert of commit f267da65bb6b ("staging: pi433:I actually saw this commit, but for some reason did not connect the dots when I wrote this patch. My bad.
make pi433_class constant"), accepted a few months ago, why not just
call it out as an explicit revert if that's what you want to do?
class_create is going away "soon", why add this back when people areIt's true, I got it the wrong way I guess. I thought class_create is the preferred API (but now that you mentioned commit f267da65bb6b, I see it's not). I did notice it in many other drivers though, and took them as an example (e.g. gnss).
working so hard to remove its usage? What tutorial did you read that
made you want to make this change?
thanks,
greg k-h