sunxi-serial: Fix bad pointer access in sw_serial_pm

The sunxi-serial code assumes that the struct uart_port *port parameter
passed to the pm callback it the address of the struct it used to register.

But this is completely wrong! The argument passed to serial8250_register_port
is only a template, it is copied not used directly. Instead store the
correct address in port->private_data and use that.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-serial: No need to keep the port struct in memory

Since it is only a template we don't need to keep it around.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-serial: Get rid of sw_serial global array

There is no need for global state here, instead store the line-number we
got from registering together with our other info in the sw_serial_port
struct.

While at it, also add proper error checking for the serial8250_register_port
call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-serial: Get rid of useless sw_serial_get_config

All info gathered there is never uses, so while we're cleaning up the
sunxi-serial code lets nuke this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>