Received: by 10.223.185.116 with SMTP id b49csp2242718wrg; Mon, 12 Feb 2018 06:44:58 -0800 (PST) X-Google-Smtp-Source: AH8x226w4KtqxqE8QOWOu72JO4de1bPU2iTDJxoTtEe6noPYiXef4fl7J413kH/IplKfP1AmrGLY X-Received: by 10.99.121.129 with SMTP id u123mr9562564pgc.263.1518446698714; Mon, 12 Feb 2018 06:44:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518446698; cv=none; d=google.com; s=arc-20160816; b=PSF8Wm3GliQFkqNXDYcxpwwY8FVygFBdb+cxj4kQus0wXoAue+7YVPSKY/KsnKRCtR Bsl8XopNLNvkLjNPNmMebBv6la60Vqe8CxlEsbO6NTnsVBAr08HsUtyPWA3Kf+IFYfZn 6TZHcD1TI9osB6IJcGTrM11t6cFEKQPbpL+9eDHllL0e0wHO06wxu/Vevz4zm+aE2LC7 Twc4xHdR0R7paqahO6hqNyzjF/7dAqwTXfnW6zXxwBi5NYkSe12N/atv4CxvrjNAmFzt 2Jx4x/Kr51pgGm1c7rNR1C8HYy3oY2Zi6Uizgq59RKcSsGib6bVQieUY9NgTj65Tde+W ZWaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=iH+OuN/wZlk7F4jwK/YoLCB69BcMaqNZydYp+lhGIZY=; b=Yi0cWYpos38qWyU1jxHPXmH8U2oO1La6B9iyBXwG/9urAxaJnrZKw67Ww70fsl89cl +V8KX4F2W5/efw6FT4XoHicY40GrGnCWv/u+GWkmZcNrKgTlKrWn/2wwEXAkV3yO+ESj derZApMZm5EuyHczEOiWZj1YjdL6FGQ/Mv1cqsjaKmk3Ak+2oS3GXw8t/F7GtMioOJLJ J/VQCmS1TQyn7IGRvUjNrlnVFxxwV8mUxMhnuie93Ko9IulUcrpIQCjC1ml0CiWmwc5+ sVZwX7Z+8vMqLf/rZYx/guH8EJJ3KjnVtTGpjvUa5P72WtZ+owDWwsZ6eCzrBItSGglO gCKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=K/wFxHSi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s71si1787216pgc.17.2018.02.12.06.44.44; Mon, 12 Feb 2018 06:44:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=K/wFxHSi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935481AbeBLNYJ (ORCPT + 99 others); Mon, 12 Feb 2018 08:24:09 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:38616 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934054AbeBLNYH (ORCPT ); Mon, 12 Feb 2018 08:24:07 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1CDMDKX130014; Mon, 12 Feb 2018 13:23:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=iH+OuN/wZlk7F4jwK/YoLCB69BcMaqNZydYp+lhGIZY=; b=K/wFxHSigrF5iOM+9tf9DScSwoKK+PlDT+FgNUEKMnYog3zdsQPRWh6+KuHquqLzq6ai CsgxZDpgncyGt6A3Vg75y1tmectp3KD3Gbe9jJR3Jac/NFYQpWZwi+fsE0WIej6LoiyX Nh1V5V6I4tKLWuu2TqHEmee0Jv8qvm7lHv0FTlrRcbow0SihGdBoT/fp5palY2I8cqN0 2MCfqwI/RHhIaD/W/RfmFyfOnp1vgyBbAv5KYGw1zinx2xWtprghe5JfO1IXu4WvKKMd TyUW/hlDmB2H/E6/neCIfoC+qxx35d/p+YpfGsitD49x5hGOZxh/KZYrbSHer3eLtyvr Hg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2g3amf8aa8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 12 Feb 2018 13:23:39 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1CDIbFu019267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Feb 2018 13:18:38 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w1CDIa68021634; Mon, 12 Feb 2018 13:18:36 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 12 Feb 2018 05:18:36 -0800 Date: Mon, 12 Feb 2018 16:18:26 +0300 From: Dan Carpenter To: Himanshu Jha Cc: 21cnbao@gmail.com, jic23@kernel.org, devel@driverdev.osuosl.org, lars@metafoo.de, Michael.Hennerich@analog.com, linux-iio@vger.kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, pmeerw@pmeerw.net, knaack.h@gmx.de Subject: Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging Message-ID: <20180212131826.ebazvmp6iv7i5fav@mwanda> References: <1518436499-8584-1-git-send-email-himanshujha199640@gmail.com> <1518436499-8584-5-git-send-email-himanshujha199640@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1518436499-8584-5-git-send-email-himanshujha199640@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8802 signatures=668668 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=669 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802120173 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I think -M is prefered for these types of diffs? Not sure. On Mon, Feb 12, 2018 at 05:24:59PM +0530, Himanshu Jha wrote: > +static int adis16201_probe(struct spi_device *spi) > +{ > + struct iio_dev *indio_dev; > + struct adis *st; > + int ret; > + > + indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); > + if (!indio_dev) > + return -ENOMEM; > + > + st = iio_priv(indio_dev); > + spi_set_drvdata(spi, indio_dev); > + > + indio_dev->name = spi->dev.driver->name; > + indio_dev->dev.parent = &spi->dev; > + indio_dev->info = &adis16201_info; > + > + indio_dev->channels = adis16201_channels; > + indio_dev->num_channels = ARRAY_SIZE(adis16201_channels); > + indio_dev->modes = INDIO_DIRECT_MODE; > + > + ret = adis_init(st, indio_dev, spi, &adis16201_data); > + if (ret) > + return ret; > + > + ret = adis_setup_buffer_and_trigger(st, indio_dev, NULL); > + if (ret) > + return ret; We should clean up the IRQ which we enabled in adis_init() instead of returning directly. > + > + /* Get the device into a sane initial state */ > + ret = adis_initial_startup(st); > + if (ret) > + goto error_cleanup_buffer_trigger; > + > + ret = iio_device_register(indio_dev); > + if (ret < 0) > + goto error_cleanup_buffer_trigger; > + > + return 0; > + > +error_cleanup_buffer_trigger: > + adis_cleanup_buffer_and_trigger(st, indio_dev); > + > + return ret; > +} Otherwise it looks fine to my not-an-iio-expert eye. regards, dan carpenter