I started writing this code, but I ran into an issue where: lock = gen_expression_from_key(arg, key); doesnt' work. The arg is "&icom_port->uart_port" and the key is "&$->lock". The check_locking.c code does this as strings, but I want to do this as expressions... Anyway, here's the code that I have so far. regards, dan carpenter