Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12244

Why do some linux header files define a function to return 0 after the declaration?

$
0
0

I am looking at the Linux 4.14 kernel's include/linux/clk.h file, and have noticed that some of the functions are declared, and then later defined to return 0 or NULL.

For example:

struct clk *clk_get(struct device *dev, const char *id);...static inline struct clk *clk_get(struct device *dev, const char *id){        return NULL;}

What is the purpose of doing this? I see multiple C source files that fully define this function and still include linux/clk.h.


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>