From patchwork Mon Jan 27 11:56:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 3542141 Return-Path: X-Original-To: patchwork-linux-media@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 1B5F79F391 for ; Mon, 27 Jan 2014 12:01:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0418520122 for ; Mon, 27 Jan 2014 12:01:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55F3620103 for ; Mon, 27 Jan 2014 12:01:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751425AbaA0MA4 (ORCPT ); Mon, 27 Jan 2014 07:00:56 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:60003 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbaA0MAz (ORCPT ); Mon, 27 Jan 2014 07:00:55 -0500 Received: by mail-pb0-f45.google.com with SMTP id un15so5795580pbc.4 for ; Mon, 27 Jan 2014 04:00:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WgZSF3eLPXHZkTRp9rE8hcXduw57dxjcvPULqasE3wA=; b=hl5KryfQE8vfdRUPh4JIdqKJSl8cDLJsOceY0WACNjI/+rtLb6Lc9a3vKxMNJGcLGz pFtw/Is6s2NdHopNgaTUsKINAmAwi0kCecboJlEFwWV7miVcXsjaM5nmES+G4Wv8M8GI GaymeDCX9sTLt5tMTcxzWgJrJJA6GW2h/j2Z8zxoAtiUdkh3f8zFCNCZKbDbyQZ3dutB kk+zdayFY6/yxdpwDVmAPOBBcxedvaHe8EVlRTfa/2C0/gEkh9PIAem2K+cutLlneHMM KfoTcwCp4ZdAk2oVbQS2AzhdcDRzBpNY+LugLZ5UGf5h5em93125///dMKHKCR9m4IXb R++w== X-Gm-Message-State: ALoCoQmevC0C66kbObdC0WYkY74Omw86gMa+kvZSigEqkrENuI5RRN4P4U6OV41hge5gUcwsOu7N X-Received: by 10.67.4.169 with SMTP id cf9mr29638950pad.45.1390824055114; Mon, 27 Jan 2014 04:00:55 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id y9sm83553692pas.10.2014.01.27.04.00.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 04:00:54 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: hverkuil@xs4all.nl, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/1] [media] radio-keene: Use module_usb_driver Date: Mon, 27 Jan 2014 17:26:02 +0530 Message-Id: <1390823762-14296-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 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 module_usb_driver eliminates the boilerplate and makes the code simpler. Signed-off-by: Sachin Kamat --- drivers/media/radio/radio-keene.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c index fa3964022b96..3d127825eceb 100644 --- a/drivers/media/radio/radio-keene.c +++ b/drivers/media/radio/radio-keene.c @@ -416,22 +416,5 @@ static struct usb_driver usb_keene_driver = { .reset_resume = usb_keene_resume, }; -static int __init keene_init(void) -{ - int retval = usb_register(&usb_keene_driver); - - if (retval) - pr_err(KBUILD_MODNAME - ": usb_register failed. Error number %d\n", retval); - - return retval; -} - -static void __exit keene_exit(void) -{ - usb_deregister(&usb_keene_driver); -} - -module_init(keene_init); -module_exit(keene_exit); +module_usb_driver(usb_keene_driver);