From patchwork Mon Oct 8 14:13:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1566051 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D172740135 for ; Mon, 8 Oct 2012 14:13:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750965Ab2JHONm (ORCPT ); Mon, 8 Oct 2012 10:13:42 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:36573 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799Ab2JHONl (ORCPT ); Mon, 8 Oct 2012 10:13:41 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so2885333qch.19 for ; Mon, 08 Oct 2012 07:13:41 -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=DXynyekyGam6NobaWqceYxQmVyhGaSA92mcBSpFAUwc=; b=ctJbLCT5I15d2ZvJ9J3QwtU2uaGtCc76hNUSBRSTfHT+ls0LsRg3eeV6MBcQre/Ep3 tFJvZ9zaFJjf/5i6A2SzOq5uWlxKzaNg9ixY0+ijdwzvteRrLRUuZyJZGLqKIWpXyB9z GSQ1YK9BOkFuaGz+hfbPblKAzaqqBaZD6QjGGrrYzAwmiirBqws5OBASLhlmVjW9lbpZ BGUdBqN5HxojAj+g7E3How6aL8MgKs8TP9RbK7D1d+5fDckw5gL39o5acTUeku3ez2m3 TvEN1GzKY9FtC27Qpw4DMp/K5EIAxcY5wIJaP401Zpa70a5F/2muItR8ZtW61JHtO2r1 fFvw== MIME-Version: 1.0 Received: by 10.49.104.3 with SMTP id ga3mr42633140qeb.11.1349705621335; Mon, 08 Oct 2012 07:13:41 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Mon, 8 Oct 2012 07:13:41 -0700 (PDT) Date: Mon, 8 Oct 2012 22:13:41 +0800 Message-ID: Subject: [PATCH] i2c: adv7183: use module_i2c_driver to simplify the code From: Wei Yongjun To: mchehab@infradead.org Cc: yongjun_wei@trendmicro.com.cn, linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 Acked-by: Scott Jiang --- drivers/media/i2c/adv7183.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" 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/media/i2c/adv7183.c b/drivers/media/i2c/adv7183.c index e1d4c89..10c3c1d 100644 --- a/drivers/media/i2c/adv7183.c +++ b/drivers/media/i2c/adv7183.c @@ -681,18 +681,7 @@ static struct i2c_driver adv7183_driver = { .id_table = adv7183_id, }; -static __init int adv7183_init(void) -{ - return i2c_add_driver(&adv7183_driver); -} - -static __exit void adv7183_exit(void) -{ - i2c_del_driver(&adv7183_driver); -} - -module_init(adv7183_init); -module_exit(adv7183_exit); +module_i2c_driver(adv7183_driver); MODULE_DESCRIPTION("Analog Devices ADV7183 video decoder driver"); MODULE_AUTHOR("Scott Jiang ");