From patchwork Thu Mar 12 17:01:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 5997271 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CFA009F2A9 for ; Thu, 12 Mar 2015 17:01:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2BD22037E for ; Thu, 12 Mar 2015 17:01:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15B922034F for ; Thu, 12 Mar 2015 17:01:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753901AbbCLRBj (ORCPT ); Thu, 12 Mar 2015 13:01:39 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:51145 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754516AbbCLRBj (ORCPT ); Thu, 12 Mar 2015 13:01:39 -0400 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0LhGOe-1ZIPny2sSW-00mYG9; Thu, 12 Mar 2015 18:01:02 +0100 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Dmitry Torokhov , jic23@kernel.org, linux-samsung-soc@vger.kernel.org, padma.v@samsung.com, Maurus Cuelenaere , Liam Girdwood , Tomasz Figa , cw00.choi@samsung.com, Mark Brown , Kukjin Kim , a.kesavan@samsung.com, ch.naveen@samsung.com Subject: Re: [PATCH 06/10] iio: exynos-adc: add experimental touchscreen support Date: Thu, 12 Mar 2015 18:01 +0100 Message-ID: <2880161.O2Qj0NkBq3@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150304231000.GD38298@dtor-ws> References: <1425299763-4066822-1-git-send-email-arnd@arndb.de> <1425299763-4066822-7-git-send-email-arnd@arndb.de> <20150304231000.GD38298@dtor-ws> MIME-Version: 1.0 X-Provags-ID: V03:K0:haZ+1pGXKIZtiAer9qHzNAwIcc1x1QZwOfeyFBX37xmCxkcx4qs nvtavhPi2aRgaQvs1Wp+krSpjiSVX9VBZM3OuSitE06HSsUiKwQNiFG59ROXJ+wv/zyXMeO iQ8Z1IeLWPUD7DwDZx9PweXA3wEFvRcVdp6/L74JkwzjhpibsEmL8gOWaJ/GQ+mtMj54Wvu kHSSD4uNPl247vQ9kaHhA== X-UI-Out-Filterresults: notjunk:1; Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wednesday 04 March 2015 15:10:00 Dmitry Torokhov wrote: > > +static int exynos_adc_ts_init(struct exynos_adc *info) > > +{ > > + int ret; > > + > > + if (info->tsirq <= 0) > > + return -ENODEV; > > + > > + info->input = input_allocate_device(); > > + if (!info->input) > > + return -ENOMEM; > > + > > + info->input->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); > > + info->input->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); > > + > > + input_set_abs_params(info->input, ABS_X, 0, 0x3FF, 0, 0); > > + input_set_abs_params(info->input, ABS_Y, 0, 0x3FF, 0, 0); > > + > > + info->input->name = "S3C24xx TouchScreen"; > > + info->input->id.bustype = BUS_HOST; > > + info->input->open = exynos_adc_ts_open; > > + info->input->close = exynos_adc_ts_close; > > + > > + input_set_drvdata(info->input, info); > > + > > + ret = input_register_device(info->input); > > + if (ret) > > + input_free_device(info->input); > > > If you fail to register input device are you sure you want to continue > and register interrupt? > > > + > > + disable_irq(info->tsirq); > > + ret = request_threaded_irq(info->tsirq, NULL, exynos_ts_isr, > > + 0, "touchscreen", info); > > + if (ret) > > + input_unregister_device(info->input); > > + > > + return ret; > > +} Sorry for the delayed reply, I've now folded in this patch: Arnd --- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index 75cd381a8181..d11cd604562c 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c @@ -732,8 +732,10 @@ static int exynos_adc_ts_init(struct exynos_adc *info) input_set_drvdata(info->input, info); ret = input_register_device(info->input); - if (ret) + if (ret) { input_free_device(info->input); + return ret; + } disable_irq(info->tsirq); ret = request_threaded_irq(info->tsirq, NULL, exynos_ts_isr,