From patchwork Mon Mar 2 04:38:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 5910151 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 29116BF440 for ; Mon, 2 Mar 2015 04:47:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5130E20263 for ; Mon, 2 Mar 2015 04:47:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7748920221 for ; Mon, 2 Mar 2015 04:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753685AbbCBEq4 (ORCPT ); Sun, 1 Mar 2015 23:46:56 -0500 Received: from ring0.de ([5.45.105.125]:40040 "EHLO ring0.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753484AbbCBEqu (ORCPT ); Sun, 1 Mar 2015 23:46:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 From: Sebastian Reichel To: Sebastian Reichel Cc: Peter Ujfalusi , Kai Vehmanen , Pavel Machek , Pali Rohar , Aaro Koskinen , Ivaylo Dimitrov , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: [PATCH 5/9] HSI: cmt_speech: Cleanup initialisation Date: Mon, 2 Mar 2015 05:38:55 +0100 Message-Id: <1425271139-24715-6-git-send-email-sre@kernel.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1425271139-24715-1-git-send-email-sre@kernel.org> References: <1425271139-24715-1-git-send-email-sre@kernel.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cleanup initialisation process, so that its similar to the style used in ssi_protocol driver. Signed-off-by: Sebastian Reichel --- drivers/hsi/clients/cmt_speech.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c index 6d852ea..8d9860b 100644 --- a/drivers/hsi/clients/cmt_speech.c +++ b/drivers/hsi/clients/cmt_speech.c @@ -1369,7 +1369,7 @@ static struct miscdevice cs_char_miscdev = { .fops = &cs_char_fops }; -static int __init cs_hsi_client_probe(struct device *dev) +static int cs_hsi_client_probe(struct device *dev) { int err = 0; struct hsi_client *cl = to_hsi_client(dev); @@ -1385,12 +1385,12 @@ static int __init cs_hsi_client_probe(struct device *dev) err = misc_register(&cs_char_miscdev); if (err) - dev_err(dev, "Failed to register\n"); + dev_err(dev, "Failed to register: %d\n", err); return err; } -static int __exit cs_hsi_client_remove(struct device *dev) +static int cs_hsi_client_remove(struct device *dev) { struct cs_hsi_iface *hi; @@ -1417,19 +1417,15 @@ static struct hsi_client_driver cs_hsi_driver = { static int __init cs_char_init(void) { - int err = 0; - - err = hsi_register_client_driver(&cs_hsi_driver); - if (err) - pr_err(DRIVER_NAME ": Error when registering driver %d\n", err); - - return err; + pr_info("CMT speech driver added\n"); + return hsi_register_client_driver(&cs_hsi_driver); } module_init(cs_char_init); static void __exit cs_char_exit(void) { hsi_unregister_client_driver(&cs_hsi_driver); + pr_info("CMT speech driver removed\n"); } module_exit(cs_char_exit);