Re: [PATCH v5 16/44] Input: gameport: add ISA and HAS_IOPORT dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Niklas,

On Mon, May 22, 2023 at 12:50:21PM +0200, Niklas Schnelle wrote:
> diff --git a/include/linux/gameport.h b/include/linux/gameport.h
> index 8c2f00018e89..4d5720022b63 100644
> --- a/include/linux/gameport.h
> +++ b/include/linux/gameport.h
> @@ -167,16 +167,21 @@ static inline void gameport_trigger(struct gameport *gameport)
>  {
>  	if (gameport->trigger)
>  		gameport->trigger(gameport);
> +#ifdef CONFIG_HAS_IOPORT
>  	else
>  		outb(0xff, gameport->io);
> +#endif

Contrary to the cover letter, this is still kind-of runtime detection
(i.e. broken drivers will silently stop working), we need to have
dev_err[_ratelimited?] here and below.

I also just posted a patch reworking this a bit so this and the chunk
below can be hidden in gameport.c.

Thanks.

-- 
Dmitry



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux