Reputation: 25
I know how struct pointers work in general. But for struct spi_controller * spi_busnum_to_master(u16 bus_num)
,
struct spi_controller
it is pointing towards ?From my understanding, a struct pointer is to enable a variable hold the address of some structure that it points to.
Upvotes: 0
Views: 121
Reputation: 223389
struct spi_controller * spi_busnum_to_master(u16 bus_num)
declares spi_busnum_to_master
to be a function taking a parameter of type u16
and returning a pointer to struct spi_controller
.
The return value is passed by whatever method is defined by the Application Binary Interface for the target platform. Often it is in a processor register.
Upvotes: 1