static void destroy_serial(struct kref *kref):
/* the ports are cleaned up and released in port_release() */
for (i = 0; i < serial->num_ports; ++i)
if (serial->port[i]->dev.parent != NULL) {
device_unregister(&serial->port[i]->dev);
serial->port[i] = NULL;
}
if (serial->type->shutdown)
serial->type->shutdown(serial);
IMHO shutdown() is using serial->port[] and bombs.
Could you reverse the order here?
Regards
Oliver
-