From patchwork Sun Apr 6 13:44:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Erculiani X-Patchwork-Id: 3943401 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 99C529F369 for ; Sun, 6 Apr 2014 13:45:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA10F2037A for ; Sun, 6 Apr 2014 13:45:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A97322035C for ; Sun, 6 Apr 2014 13:45:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753352AbaDFNpN (ORCPT ); Sun, 6 Apr 2014 09:45:13 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:35733 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752817AbaDFNpM (ORCPT ); Sun, 6 Apr 2014 09:45:12 -0400 Received: by mail-wg0-f47.google.com with SMTP id x12so5653244wgg.30 for ; Sun, 06 Apr 2014 06:45:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=cnCpBp/o7fmKTJgZlTfSTvwu4r2C0ykHPEigtXrQMro=; b=RJjlUhZ3y3N1VvEOA2fByqjUpQ1QPb9huysyPf4njszrswL3Bn3RxnWsIf24gREIgb 461C6G1Ea5MFclQbO/laJd5RwT+FcGhNPngIGhenQM4+Z58fsVoOGqj6neKPPSPOEX0/ NWF4BBOONZLI32WDKQI9GzZXK/l4GjARyTTPP9efO1zT0PhPoc2T2cSq0jC0HuySLlCU AfcTOQQ8LZzNXqIRZLrtPRDDkgAslUiAbXGipS3JrCxtA0F6XQYO12a+rROv0FQkkRmW U+mDig/s3ZCXuTJjWOqALEThRCslkJBv+na8duWn+FHBdjb8+txvFHQRdWfGZ9EY4Sty xbWw== X-Gm-Message-State: ALoCoQlJqgfrtZePe7wKXbf5A7H6msBSnnVX4rTWkuIbC0vR/ZrPnzCmbTpnkgSvBAY56dMze/Mk X-Received: by 10.180.107.136 with SMTP id hc8mr19109441wib.11.1396791910509; Sun, 06 Apr 2014 06:45:10 -0700 (PDT) Received: from rhino.local (host75-104-dynamic.14-87-r.retail.telecomitalia.it. [87.14.104.75]) by mx.google.com with ESMTPSA id o5sm34597214eeg.8.2014.04.06.06.45.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Apr 2014 06:45:08 -0700 (PDT) From: lxnay@sabayon.org To: linux-fbdev@vger.kernel.org Cc: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, Fabio Erculiani Subject: [PATCH] uvesafb: abort initialization if video=uvesafb is not set Date: Sun, 6 Apr 2014 15:44:33 +0200 Message-Id: <1396791873-22606-1-git-send-email-lxnay@sabayon.org> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Erculiani This patch makes possible to ship kernels with both vesafb and uvesafb in order to guarantee a smooth transition to uvesafb and cope with potential incompatibiles introduced by uvesafb making possible to disable it via cmdline. In case both vesafb and uvesafb are built-in, the kernel will try to initialize both, which makes possible to select the wanted one using either video=vesafb:... or video=uvesafb:.... In this way, old distro installations will keep working as before while new ones can adopt video=uvesafb. The behaviour does not change if uvesafb is built as a module. --- drivers/video/uvesafb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c index d428445..04c4742 100644 --- a/drivers/video/uvesafb.c +++ b/drivers/video/uvesafb.c @@ -1957,6 +1957,10 @@ static int uvesafb_init(void) if (fb_get_options("uvesafb", &option)) return -ENODEV; + if (!option || !*option) + /* if vesafb is enabled, this will make possible to fallback to it */ + return -ENODEV; + uvesafb_setup(option); #endif err = cn_add_callback(&uvesafb_cn_id, "uvesafb", uvesafb_cn_callback);