Hi Sakari,
Hi Jammy, On Thu, Nov 18, 2021 at 03:40:23PM +0800, Jammy Huang wrote:The debug log level, 0~3, is controlled by module_param, debug. The higher the value, the more the information. 0: off 1: info 2: debug 3: register operations Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>Just wondering: what's the purpose of switching to v4l2_*() functions for printing when dev_*() equivalents already can do the same?
Indeed, most of them, such as dev_err/v4l2_err or dev_info/v4l2_info, are the same. The reason why I want to adapt v4l2_*() is v4l2_dbg with which I can have module's own debug level. /* These three macros assume that the debug level is set with a module parameter called 'debug'. */ #define v4l2_dbg(level, debug, dev, fmt, arg...) \ do { \ if (debug >= (level)) \ v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \ } while (0) -- Best Regards Jammy