Message ID | 20191210143706.3928480-2-gregkh@linuxfoundation.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 06674e54cc412c47cc2b909cb06c85521999763c |
Headers | show |
Series | [01/10] tty: serial: samsung: allow driver to be built by anyone | expand |
On Tue, Dec 10, 2019 at 03:36:58PM +0100, Greg Kroah-Hartman wrote: > Fix a build warning on systems that do not have CONFIG_OF enabled. > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Best regards, Krzysztof
On 10.12.19 15:36, Greg Kroah-Hartman wrote: Hi, > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > index 83fd51607741..67c5a84d0a26 100644 > --- a/drivers/tty/serial/samsung_tty.c > +++ b/drivers/tty/serial/samsung_tty.c > @@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, > > /* Device driver serial port probe */ > > +#ifdef CONFIG_OF > static const struct of_device_id s3c24xx_uart_dt_match[]; > +#endif > + By the way: I've got some patch for conditionally declaring of match tables (including MODULE_DEVICE_TABE() call), so such ifdef's aren't needed anymore. Would you like to see it ? (IIRC already posted it quite some time ago, but probably went unnoticed) --mtx --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@metux.net -- +49-151-27565287
On Wed, Dec 11, 2019 at 12:01:28PM +0100, Enrico Weigelt, metux IT consult wrote: > On 10.12.19 15:36, Greg Kroah-Hartman wrote: > > Hi, > > > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > > index 83fd51607741..67c5a84d0a26 100644 > > --- a/drivers/tty/serial/samsung_tty.c > > +++ b/drivers/tty/serial/samsung_tty.c > > @@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, > > > > /* Device driver serial port probe */ > > > > +#ifdef CONFIG_OF > > static const struct of_device_id s3c24xx_uart_dt_match[]; > > +#endif > > + > > By the way: I've got some patch for conditionally declaring of match > tables (including MODULE_DEVICE_TABE() call), so such ifdef's aren't > needed anymore. That's not why this #ifdef is needed. greg k-h
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 83fd51607741..67c5a84d0a26 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, /* Device driver serial port probe */ +#ifdef CONFIG_OF static const struct of_device_id s3c24xx_uart_dt_match[]; +#endif + static int probe_index; static inline struct s3c24xx_serial_drv_data *s3c24xx_get_driver_data(
Fix a build warning on systems that do not have CONFIG_OF enabled. Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Hyunki Koo <kkoos00@naver.com> Cc: HYUN-KI KOO <hyunki00.koo@samsung.com> Cc: Shinbeom Choi <sbeom.choi@samsung.com> Cc: Jiri Slaby <jslaby@suse.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- drivers/tty/serial/samsung_tty.c | 3 +++ 1 file changed, 3 insertions(+)