serial: max3100: Convert to_max3100_port() to be static inline
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 10 Apr 2024 14:11:35 +0000 (17:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2024 12:08:40 +0000 (14:08 +0200)
commit25ca2d573ebae939d19f5df5fef2c58ef83ed97a
tree6cb7dd0891bfbdb0f31a883b042a705eb7310702
parent46f2bba8314fdd818cc7408126919cb6421b4e19
serial: max3100: Convert to_max3100_port() to be static inline

As Jiri rightfully pointed out the current to_max3100_port() macro
implementation is fragile in a sense that it expects the variable
name to be port, otherwise it blow up the build.

Change this to be static inline to prevent bad compilation.

Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240410141135.1378948-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max3100.c