Tuesday, April 29, 2025

Re: Out of curiosity

Look two lines up, it is a device struct that comes from the caller of
that function.

void
qcdwusb_attach(struct device *parent, struct device *self, void *aux)
{

Den tis 29 apr. 2025 kl 17:07 skrev BESSOT Jean-Michel
<jean-michel.bessot@lacomte.net>:
>
> Hello
>
> I read /usr/src/sys/dev/fdt/qcdwusb.c and I found a line I do not
> understand. The line 58.
>
> struct qcdwusb_softc *sc = (struct qcdwusb_softc *)self;
>
> what the self is doing ?
>
> bye
>


--
May the most significant bit of your life be positive.

No comments:

Post a Comment