From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031194AbdDTMNQ (ORCPT ); Thu, 20 Apr 2017 08:13:16 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:33769 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030702AbdDTMNO (ORCPT ); Thu, 20 Apr 2017 08:13:14 -0400 From: Sjoerd Simons To: linux-serial@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Russell King , Jiri Slaby Subject: [PATCH v2 0/2] Move uart_register_driver call to device probe for pl010 and sh-sci Date: Thu, 20 Apr 2017 14:12:59 +0200 Message-Id: <20170420121301.382-1-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When testing on a Renesas board with the PL010 serial driver enabled serial output broke. Turns out the minor device numbers for both drivers happen to overlap, causing whichever driver happened to be the second one to register to fail. The attached patches move the uart_register_driver call to probe time for both drivers avoiding the issue. Changes in v2: - Add locking to prevent issues when two probes run in parallel Sjoerd Simons (2): serial: pl010: Move uart_register_driver call to device probe serial: sh-sci: Move uart_register_driver call to device probe drivers/tty/serial/amba-pl010.c | 31 +++++++++++++++++++++---------- drivers/tty/serial/sh-sci.c | 26 +++++++++++++++----------- 2 files changed, 36 insertions(+), 21 deletions(-) -- 2.11.0