From patchwork Mon Oct 8 14:07:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1566021 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5BE91DF238 for ; Mon, 8 Oct 2012 14:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752801Ab2JHOHO (ORCPT ); Mon, 8 Oct 2012 10:07:14 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:59501 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752750Ab2JHOHN (ORCPT ); Mon, 8 Oct 2012 10:07:13 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so2878317qch.19 for ; Mon, 08 Oct 2012 07:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=f4luDc3zqU1r8DQN6m1atvpI+iIlDPW1KTAWy5mq/S0=; b=PKwnaWQ+Yp33XYULJiswQD8A/iZ0/m+hcRPzcse0O5fd+sLx9AcSWpMnQ+rS1QfZfV SXp1Ul+3pxY2biEarRVoe1YpIKPmEcjj5+aL/M3w9Zb3qhrYP/cucbyPdP57YZsuOdtD NdpllekU/hdDDk1m+Xg3ngnb8tpj8NvSv+n4LChPjojloCMfOQgzRrhWdqvT+M+tWTY/ o3UNiUgCY3Zu8JUF8K4LWEnqriINGcaBKJZf7Vbj43ia0bl4Py+B8fZewgAcTVUE/mmT zsgG0atwP2b2/WOeuFOGRWcwDNqCCar67VO+KbJAKcMOKt9Ir9A/aY+NAo+fITDTVQUw pNFw== MIME-Version: 1.0 Received: by 10.224.100.200 with SMTP id z8mr29895428qan.75.1349705233078; Mon, 08 Oct 2012 07:07:13 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Mon, 8 Oct 2012 07:07:13 -0700 (PDT) Date: Mon, 8 Oct 2012 22:07:13 +0800 Message-ID: Subject: [PATCH] matrox maven: use module_i2c_driver to simplify the code From: Wei Yongjun To: FlorianSchandinat@gmx.de Cc: yongjun_wei@trendmicro.com.cn, linux-fbdev@vger.kernel.org Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org From: Wei Yongjun Use the module_i2c_driver() macro to make the code smaller and a bit simpler. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/video/matrox/matroxfb_maven.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c index 217678e..ed05c36 100644 --- a/drivers/video/matrox/matroxfb_maven.c +++ b/drivers/video/matrox/matroxfb_maven.c @@ -1283,19 +1283,9 @@ static struct i2c_driver maven_driver={ .id_table = maven_id, }; -static int __init matroxfb_maven_init(void) -{ - return i2c_add_driver(&maven_driver); -} - -static void __exit matroxfb_maven_exit(void) -{ - i2c_del_driver(&maven_driver); -} +module_i2c_driver(maven_driver); MODULE_AUTHOR("(c) 1999-2002 Petr Vandrovec "); MODULE_DESCRIPTION("Matrox G200/G400 Matrox MGA-TVO driver"); MODULE_LICENSE("GPL"); -module_init(matroxfb_maven_init); -module_exit(matroxfb_maven_exit); /* we do not have __setup() yet */