Hello,

On Dec 4, 2007 4:18 PM, Peter Poulsen <[EMAIL PROTECTED]> wrote:
> I now have this peice of code that uses the clock. However, the
> 'struct clk' is
> defined in clock.c, so not suprisingly it refuses to compile. I have
> no idea how
> other manage to  make their code compile when they use the 'struct
> clk'. If somebody
> could explain this, then please do so :-)
>
>          clk = clk_get(NULL, "psi_clk");
>          if( !clk ) {
>                  printk("no clk found\n");
>          }
>          else {
>                   printk("clk name: %s\n", clk->name);
>                   printk("clk rate: %u\n", clk->rate);
>          }
>
>
> /peter

As far as I can tell, struct clk is declared in include/linux/clk.h.
It is a forward declaration, meaning that you cannot access the fields
of this composite type. But why would you need to do that? In order to
read the rate of a clock, you should use clk_get_rate() which is
defined in the same header.

Vegard

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to