Instead of using container_of() explicitly, introduce a helper macro...
This saves a lot of lines of code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Reviewed-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
@@ -110,6 +111,8 @@ struct max3100_port {
struct timer_list timer;
};
+#define to_max3100_port(port) container_of(port, struct max3100_port, port)