Re: [PATCH] Add removal schedule of register_serial/unregister_serial to appropriate file

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

 



On Thu, Jun 23, 2005 at 02:23:35PM +0100, Russell King wrote:
> +What:	register_serial/unregister_serial
> +When:	December 2005
> +Why:	This interface does not allow serial ports to be registered against
> +	a struct device, and as such does not allow correct power management
> +	of such ports.  8250-based ports should use serial8250_register_port
> +	and serial8250_unregister_port instead.
> +Who:	Russell King <[email protected]>

Ok, now that this is in, I guess I should arrange for register_serial &
co to throw a compiler warning.  However, this is non-trivial because
several other drivers declare this function:

drivers/macintosh/macserial.c:int register_serial(struct serial_struct *req)
drivers/macintosh/macserial.c:void unregister_serial(int line)
drivers/serial/68328serial.c:int register_serial(struct serial_struct *req)
drivers/serial/68328serial.c:void unregister_serial(int line)
drivers/serial/crisv10.c:register_serial(struct serial_struct *req)
drivers/serial/crisv10.c:void unregister_serial(int line)

Can folk who look after these drivers please comment on why these
functions are there.


Other places appear to have a prototype for these functions but do not
use them:

arch/xtensa/platform-iss/console.c:int register_serial(struct serial_struct*);
arch/xtensa/platform-iss/console.c:void unregister_serial(int);
drivers/char/amiserial.c:int register_serial(struct serial_struct *req);
drivers/char/amiserial.c:void unregister_serial(int line);

The patch which follows this message will remove these.


In terms of the use of these functions, this is the state of play as of
yesterday:

arch/frv/kernel/setup.c://      register_serial(&__frv_uart0);
arch/frv/kernel/setup.c://      register_serial(&__frv_uart1);
drivers/char/mwave/mwavedd.c:   return register_serial(&serial);
drivers/char/mwave/mwavedd.c:           unregister_serial(pDrvData->sLine);
drivers/misc/ibmasm/uart.c:     sp->serial_line = register_serial(&serial);
drivers/misc/ibmasm/uart.c:     unregister_serial(sp->serial_line);
drivers/net/ioc3-eth.c: register_serial(&req);
drivers/net/ioc3-eth.c: register_serial(&req);
drivers/parport/parport_serial.c:               line = register_serial (&serial_req);
drivers/parport/parport_serial.c:               unregister_serial (priv->line[i]);
drivers/serial/bast_sio.c:      return register_serial(&serial_req);
drivers/serial/bast_sio.c:              unregister_serial(port[0]);
drivers/serial/bast_sio.c:              unregister_serial(port[1]);

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux