Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752360AbdCAKVX (ORCPT ); Wed, 1 Mar 2017 05:21:23 -0500 Received: from mail-bl2nam02on0051.outbound.protection.outlook.com ([104.47.38.51]:7632 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752180AbdCAKVE (ORCPT ); Wed, 1 Mar 2017 05:21:04 -0500 Authentication-Results: spf=pass (sender IP is 137.71.25.57) smtp.mailfrom=analog.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=analog.com; Reply-To: Subject: Re: [PATCH 2/4] Input: ad7879 - return plain error code from ad7879_probe() References: <20170228220848.31185-1-dmitry.torokhov@gmail.com> <20170228220848.31185-2-dmitry.torokhov@gmail.com> To: Dmitry Torokhov CC: "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Michael Hennerich Organization: Analog Devices Inc. Message-ID: Date: Wed, 1 Mar 2017 08:40:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170228220848.31185-2-dmitry.torokhov@gmail.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.57;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(24454002)(189002)(199003)(38730400002)(76176999)(31686004)(106466001)(50986999)(43066003)(189998001)(2906002)(64126003)(6246003)(36756003)(39060400002)(23746002)(3450700001)(53546006)(77096006)(110136004)(2870700001)(4001350100001)(229853002)(8676002)(54906002)(626004)(8936002)(33646002)(54356999)(50466002)(5660300001)(7636002)(65806001)(86362001)(305945005)(2950100002)(65956001)(31696002)(47776003)(356003)(6666003)(6916009)(83506001)(4326008)(65826007);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0301MB0840;H:nwd2mta2.analog.com;FPR:;SPF:Pass;MLV:ovrnspm;MX:1;A:1;PTR:nwd2mail11.analog.com;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD020;1:sCnZ7CJ40z2KMSQjbIhinJk6N51Ge0bYqfYgMvVABf5tOqt2WFo445YfbczY295e1tAko8sFlntIjyaGyvO/FEaWbwQiBIPb268nUTVmNvR6+ytnAWu6teZqES6+l2npAQsoyUC+39VQnMGFQbjln/nsJUM5IqOepbwZS9+F0/vpH4iLtDV1u9xJXkF2EXMm9JILj0kr0Amh9/pSregQeN4QkrqCCZsGenpgx/X63FZoixcbzC2SNz5GrxMPqbwJ4y5xh1hfbqjsdGU6E08Z+SqML6BpQyjQaitc7JpxDL5ZeJjYwpuWQor4dQvU2d2fpLct2vsW3MJDqk20/0oC4AFnuAHjgRfyxvbf9Mjz3LnWH8+b+yBvUfoGiv0Rw8k40HTbAJFNBA0c3P3A/ErsNT7sgkfN+p3URU9dahioUITdBrJGyfW9bvpaywxC6aiaqjsRzuu68/XlRaKXQI/RO9vToIYZslUGGKYc8MOzDYUDEkzdew5QekGnzl1sLLf1i3Wde0M+rcHu2IQrM6FtuKdrgVa4XgnQX+u1bXt0ldg= X-MS-Office365-Filtering-Correlation-Id: a849e07a-4a7a-4fcc-eccc-08d4607601fb X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:BY1PR0301MB0840; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0840;3:mZ2fLb8aDWFEIc7/CJQCJ34daVJYMj/uaBHG+EQAYf66f6xM+KnT89x1VShv2v6facOv3Sqf/3FnpUVR+ibUJK0766E69BUEiuZQcKvcf97EqTQH+cGL/CvDos4bCWnCB+fX6Jy/U+bNW47CqXuh2av4dQvvOjIoxHOUDUD7EPHOtGWkyDxWgkLVZqdk54Z6aZCc5PTX0z/OClBqcOgApv73rCYQNNAnAslilRk1018k7+I1EOQ9fdQbooaqE0xz9lfR4aB12dTbKlSXNKCYFc8Gp8wOWV0rmzWRSB4dPF19KSC8Mx0/iCC14HElX0qZqgQw362S44okPjC+x3G+1W9AzGh7uPqnYABFS8sAVLqh6P0vqbHEv1/rSy7BpIVdmqLApTL0SKiAOXFBynrYvA==;25:msmVNAHmSpHLWy3IfQ6z/4CckX3KZ37pwVqY1R5Ek81IUBvr+f8ZPolPzOPYUhkM/ZLQ4S494P3bvEI61AmQEl1n+eEAkACDAio7MCX7gqjuYZ9FJhIXR1lhnJrXrGetmCYuYEQLIjkOQdIUE4EOJhsDwm7lEOSjU96761dsgf7MzhKp6EHBDl1bbAi+qlf93faKwCaMJuJmX8elYPQ1Y2V6E/u3Czs0dzNLGiEdTrBJjBk4B86t4yCql4YmEz/YWW+6sCjiNE9vgCixqbOekgmIHCogG8jtJ/8kgFLXR4nxBGi+/9F4N6QRIW6ZrMP/2C6Jis/n/paYjJMK94VJ7FudhdrGHdqPfBzyvEqIcA1kN7uGB8zLzb58pIgUFVpf8sAjaNOyaALab0bQcMLFFn/qp+FYcD+UqW4Ve1UMgiUTDSq1CeO1kpo/YtR9ygPJ8giTobFH7W+C/8C5hXnLmA== X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0840;31:LxhPsGOyGdIvtZ7qrNV39U1ue26LNm9YFi1nwYVa1WIr0jqwt0gMRtfeL0g3mP0FIWUZ5myKc65BtAlnKAssXdVfwQCrsFb700vjB17ktxTxuv/1Z0pLE3KLV6hX1f0V3dgbN5+0p19ap2e70FiEoziEWPixTQV31tpxbtZgsnetZ8SngfynfxH3MLia632+Mwuv2iZ72Zi2I5K9jWU0uDlftiCxQGE+Gdd0zeva3rHHuNWhMqY+zXyX1OLf5oc1jrt4msfWQPmUsscRdcL7Sh5z8B29xPcsKFdS8q1Uyqg=;20:1rqEJafRf21uP9nLNyt8Lw/xZI7dkSsZAvQ6MnqYsvuWMNqDsIj5qv9UhGzMXN/VW5DaTuiVwBEJ6An844vH5mJ85mDHbhYFqjjjJFWRdn8iP38tAvHpDLRr9Q3mxpP0bnOk8oI/IWpsk9J4V9I4DAho47X6n5Nx2d5C7IIALFv59eisk9kV7Be1EQMahvruBs7hDgxZaznPGLg4nhHhE10dcMWbxDkCpooTol04wPukt/deUV8+Gab9zMSybCE05PhbqOKF4WXSJO47HZmvPVuQevT1NCjqAbwRAFHfGMPyvoG/Q11RYD/pRX1WBBK5+eCTqxloa71qlLq6yrqBfzDqWRWKrwvP8QeijE/zo1y8jjJfhKlK/5R2SCeuQx2vCVr8dI+HCYP7AXFygPxsipSLHK6uOWtvXoqqy+pTw6HmZRjv7F0yMvCNqVitDtiBb3or8XhKXcG6yjJhcPo8DRrFBzVWZnUSsUpj0iuBiqW5nuRXxTU7ZUWQAsdo0tGX X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(232431446821674); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(13015025)(8121501046)(5005006)(13017025)(13023025)(13024025)(13018025)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(6072148)(6042181);SRVR:BY1PR0301MB0840;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB0840; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0840;4:24SRleLjhPFXo+6kBSZ6XSevExCigFEDxYYYtLsMueyoH8EdlhG47j3xJN8YAdScoqVN7ul8kh2pNKrEwJGZNX2gtb0qIAJCl6NEsuCib23Xdx0P4zFFqwOSMFBjrmK6leQu7K9u7Prp7MKASAMG2cRWQUNcGBs5PbpcIsGNoiWZ1cU+U4uthYkaZQ7b27hAfnr3XHHLq9mj6l2IoQfIrBEd/ZpH5qLfjRmiYh3WD8Vq8/SsZCF5FS8fa0DCW/AzEtavgRkHHail9XhwQC/u9LGf8LLswPK7dimrfC+3fHOjlMwt1z6z+ZOpR1mMvokYVGxDHhi1JX/mE5muO0X0wcctnn0sndxy2ugQs2S3gqOswA6mrkV1AK45A4f4ctc5gnqy5IY/WXvF96ziT6h3HqLpMmHu6gMr2WUrryzEZeDPSkl1ZjScCnE+wEbzK9BrDvA9Qodv1hdDndxbn3U1nxiyJXHxGkn3KV0jsQrGoLyrfq1P4JfRBw719E2cSre3+0DdF9kVx8NYCHdgDdeyCHfZKOtsws7o0gp8MK7NJe1I95EMYSODaDqIw9g2o3EZH3J7Hr4RvFDNxCF7sCjiQGOWjDa0aPO4c/SfYLtibSp1zKWAhQWh7/LfXR55ahbGGf9flaxO6m/SerPQh119WqHcRrfgl3R3cIi6O+xhLv2D+O1yZPIDH/sag+/9lzj6+N7EFEAjCD6SoBMajZoHV/s8vnqKTnZ4ssJmTTLwyCKnBHFDo+nlIkOEwyRp9O7re2+vmS15jT24gIV1k5glAQ== X-Forefront-PRVS: 0233768B38 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BY1PR0301MB0840;23:JbYwtVNnUtDAjrFk8kQ0i+qZV/4/4poL630?= =?Windows-1252?Q?lgwdJEVhUg6NlOnIGMOe/kXJXHHJ7VpH/3Xcnuf+ilK8JW/cBn40nKde?= =?Windows-1252?Q?jX1V4XYFVy0Gv7330TLnim8hxQq1mVoFvqaSOd1dvla/VrMPPoNC60MS?= =?Windows-1252?Q?PrHKA0LLZM7aDdBDQwoPz1oPfTeb5PVgMVAjZrIrOnIZLQzsmRtKNTgs?= =?Windows-1252?Q?U0x0FLpS8yIzc9ujo7YAvw10srbXnooLTtBlhVUmDxLo4tk+j2fXSsIn?= =?Windows-1252?Q?oj0A+YbMXsiDwTxC0lgnFODGrm0k2u/Z543iRUKZEMHqrVDcVccnU8rc?= =?Windows-1252?Q?iU9KixiZtNPKwkNLjUC9s8Z/npzMRyKmKbH+zGXDH2Rwdw8ipDENGUKh?= =?Windows-1252?Q?GstYm/2LXoK4PDuUwyt673KmfiszplJcVim+/inqdYgpuqakx6zCso+g?= =?Windows-1252?Q?WuyiXLGwPD0q/ZE+xikg4c3p6K4ixJql0AXtWqxm+G8Zc2hzFO5RKYf0?= =?Windows-1252?Q?LUGx0pZX0rrFeSctveOSXTiveSvIC/0B3lJjQuNgJ59gN7wm53Vj61WA?= =?Windows-1252?Q?+iOaZtCf5fE+cF1P/8mIvU80iHYonsJeWuEDzTZsa5FgYsTyo9KTNkPV?= =?Windows-1252?Q?ehmB3B7KN4lG43OPA3F24vQcF11lpl4gV26x265kjvgXfGUPH5ffUbW3?= =?Windows-1252?Q?PSgQkqrOE0SRERneuChYovoN0weGo32uYdmrKfNwNrog5kXkSUVw4RxG?= =?Windows-1252?Q?4QL8W9/ClG0FgRkt7Lh6/vU27369nSh2FlCe0bbey1q2ETHW/Z9gdPoC?= =?Windows-1252?Q?F5zKnzTx7WxyGJQAQ0Ioqx4rCF0TkxKsWfIjGR+Hnp31c11x26tRdT7G?= =?Windows-1252?Q?LF1KXmmLTxBcU62kiKdjql/Rc17EgknMHjTKkQz+aPPANIOv6x4AON1L?= =?Windows-1252?Q?QHD3iGSByz7scvUSkpM1mRVuoWuCt8ruv24TuCsDRvUGTyp0EWrfUwhp?= =?Windows-1252?Q?g10MYqLzfZD+Nba2MukGhLBRvErI4LccjlDcxSNGtTyFomk5QPnMjdpf?= =?Windows-1252?Q?auff2J1MTK4ZdubMjh7fwrHncnTCZyhzNdeRA92J5OmklVmekgIWSJYu?= =?Windows-1252?Q?UXe/lc19xWxCttLM4KGGyXPxqLaO4hzddeltcblFQVKZfdXBS1O50Pr+?= =?Windows-1252?Q?yoUs1Z4VChRu2HiQVkyNXYRm+B9lpNsYHAsKfkrhmkWl8yOCKuGpfKUs?= =?Windows-1252?Q?j6SmDThl4L9pxhs8jULExQQPwpHXWf/6inliIegc=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0840;6:ifz2PzLDQdEOSRnODiYVZ2r93KWgXIrL6c7WLqpb/BK8sQR0gExcJUBl74CPn79y2hyUdZ2Qs3JzuXu97e3VEFwe3ZZkdpAVndpeUA6O7n3jKhFUDp5YqlX9lMXAZ4SvOpUGGbSs6lmL9XSy/WF8yqo5nphh6PbZ5XL6+HoMmFNQLXoQsfQ5idLGj8G16Gc286ilP7C+i0cah4YGn6R/9o2FW9rnPPQQ41Mf+Mo7ZVDwb+olZrfGP0YqlMQJNc7igreUUOi84iD7fFkmdAploMryTbI/zlZc0L0kf528oj4ZHlJmIb9KRmnRI9iU5kKBRHlAmmehDgSAcNoCbwis4+cpskZb8M2N3vGNCz0f+eTmEYWeBb3ZPEYJYOM4luWjLpHL+MJa5E3HUgCg7jchh2EloD0/WC8YSCw3TCXkHn4=;5:GD76vAeQ+uWJonvwW05YId/bvg9GJ95XX+cYixXodhUx+BfUgpOKrWtm8MraEPD/QhUZJrCokG8+fSgVELNx7sEJ4IOp3jf3QmqpSzYdEVbpfauzn6IP6dUs2do2JlfZdfrfUQInc+/dFEhmvvXj8g==;24:bC4PS6AMRF6/Y7jAX73HenGEJRk+zGG5Ls6SV6fzrNiyjWE5j+8kdpu3HBJQchUuoDzlakKAq4ziETBnR6BJ2lDB2i7E8w+h9LupD9IPgU8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB0840;7:elIWWNeZIPPLusgZBdqRTWuaR1FkpHjW5Pqzrc5+IpSInmbWTcIBhsET7P1W64D2MDSFJINmUH8ILNcfrOss0fg9D8C36UX63lmunz+HVPC1CuE9AktVgzFKHHSQqcLi37ueT39ifEWPeyAYUdNsss9opFFg3bHiq16T8JzBVU6gmHusVOiv0S5ZC9dEAgWcIY38i2KV82rqPSFrqAClbcrRTk/AVLdHeOejy2rLg5ir6CYAKd+Rpt2dStxabHrYr41sGuC72miQu0CXmbmp7L/gUR8oWyzFoSFOX631cXwSyXxYLcLZpziz80XTC0SZ9bL+zyIBsXGYFQwgxnL1Mw== X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 07:38:52.0685 (UTC) X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.57];Helo=[nwd2mta2.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB0840 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6664 Lines: 206 On 28.02.2017 23:08, Dmitry Torokhov wrote: > With the switch to devm, there is no need for ad7879_probe() to return the > touchscreen structure, we can use plain error code. This also fixes issue > introduced with devm concersion, where we returned 0 on success (which > worked OK since IS_ERR(0) would not trigger, but was not correct > regardless). > > Fixes: 381f688eee3d ("Input: ad7879 - use more devm interfaces") > Signed-off-by: Dmitry Torokhov Acked-by: Michael Hennerich > --- > drivers/input/touchscreen/ad7879-i2c.c | 9 ++------- > drivers/input/touchscreen/ad7879-spi.c | 7 +------ > drivers/input/touchscreen/ad7879.c | 28 ++++++++++++++-------------- > drivers/input/touchscreen/ad7879.h | 5 ++--- > 4 files changed, 19 insertions(+), 30 deletions(-) > > diff --git a/drivers/input/touchscreen/ad7879-i2c.c b/drivers/input/touchscreen/ad7879-i2c.c > index a282d1c9e2c6..49b902b10c5f 100644 > --- a/drivers/input/touchscreen/ad7879-i2c.c > +++ b/drivers/input/touchscreen/ad7879-i2c.c > @@ -27,7 +27,6 @@ static const struct regmap_config ad7879_i2c_regmap_config = { > static int ad7879_i2c_probe(struct i2c_client *client, > const struct i2c_device_id *id) > { > - struct ad7879 *ts; > struct regmap *regmap; > > if (!i2c_check_functionality(client->adapter, > @@ -40,12 +39,8 @@ static int ad7879_i2c_probe(struct i2c_client *client, > if (IS_ERR(regmap)) > return PTR_ERR(regmap); > > - ts = ad7879_probe(&client->dev, regmap, client->irq, > - BUS_I2C, AD7879_DEVID); > - if (IS_ERR(ts)) > - return PTR_ERR(ts); > - > - return 0; > + return ad7879_probe(&client->dev, regmap, client->irq, > + BUS_I2C, AD7879_DEVID); > } > > static const struct i2c_device_id ad7879_id[] = { > diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c > index 59486ccba37d..3457a5626d75 100644 > --- a/drivers/input/touchscreen/ad7879-spi.c > +++ b/drivers/input/touchscreen/ad7879-spi.c > @@ -32,7 +32,6 @@ static const struct regmap_config ad7879_spi_regmap_config = { > > static int ad7879_spi_probe(struct spi_device *spi) > { > - struct ad7879 *ts; > struct regmap *regmap; > > /* don't exceed max specified SPI CLK frequency */ > @@ -45,11 +44,7 @@ static int ad7879_spi_probe(struct spi_device *spi) > if (IS_ERR(regmap)) > return PTR_ERR(regmap); > > - ts = ad7879_probe(&spi->dev, regmap, spi->irq, BUS_SPI, AD7879_DEVID); > - if (IS_ERR(ts)) > - return PTR_ERR(ts); > - > - return 0; > + return ad7879_probe(&spi->dev, regmap, spi->irq, BUS_SPI, AD7879_DEVID); > } > > #ifdef CONFIG_OF > diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c > index 52daaa4edc67..7118f611e222 100644 > --- a/drivers/input/touchscreen/ad7879.c > +++ b/drivers/input/touchscreen/ad7879.c > @@ -531,8 +531,8 @@ static void ad7879_cleanup_sysfs(void *_ts) > sysfs_remove_group(&ts->dev->kobj, &ad7879_attr_group); > } > > -struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap, > - int irq, u16 bustype, u8 devid) > +int ad7879_probe(struct device *dev, struct regmap *regmap, > + int irq, u16 bustype, u8 devid) > { > struct ad7879_platform_data *pdata = dev_get_platdata(dev); > struct ad7879 *ts; > @@ -542,12 +542,12 @@ struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap, > > if (irq <= 0) { > dev_err(dev, "No IRQ specified\n"); > - return ERR_PTR(-EINVAL); > + return -EINVAL; > } > > ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL); > if (!ts) > - return ERR_PTR(-ENOMEM); > + return -ENOMEM; > > if (pdata) { > /* Platform data use swapped axis (backward compatibility) */ > @@ -564,13 +564,13 @@ struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap, > ad7879_parse_dt(dev, ts); > } else { > dev_err(dev, "No platform data\n"); > - return ERR_PTR(-EINVAL); > + return -EINVAL; > } > > input_dev = devm_input_allocate_device(dev); > if (!input_dev) { > dev_err(dev, "Failed to allocate input device\n"); > - return ERR_PTR(-ENOMEM); > + return -ENOMEM; > } > > ts->dev = dev; > @@ -618,14 +618,14 @@ struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap, > touchscreen_parse_properties(input_dev, false, NULL); > if (!input_abs_get_max(input_dev, ABS_PRESSURE)) { > dev_err(dev, "Touchscreen pressure is not specified\n"); > - return ERR_PTR(-EINVAL); > + return -EINVAL; > } > } > > err = ad7879_write(ts, AD7879_REG_CTRL2, AD7879_RESET); > if (err < 0) { > dev_err(dev, "Failed to write %s\n", input_dev->name); > - return ERR_PTR(err); > + return err; > } > > revid = ad7879_read(ts, AD7879_REG_REVID); > @@ -634,7 +634,7 @@ struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap, > if (input_dev->id.product != devid) { > dev_err(dev, "Failed to probe %s (%x vs %x)\n", > input_dev->name, devid, revid); > - return ERR_PTR(-ENODEV); > + return -ENODEV; > } > > ts->cmd_crtl3 = AD7879_YPLUS_BIT | > @@ -659,26 +659,26 @@ struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap, > dev_name(dev), ts); > if (err) { > dev_err(dev, "Failed to request IRQ: %d\n", err); > - return ERR_PTR(err); > + return err; > } > > __ad7879_disable(ts); > > err = sysfs_create_group(&dev->kobj, &ad7879_attr_group); > if (err) > - return ERR_PTR(err); > + return err; > > err = devm_add_action_or_reset(dev, ad7879_cleanup_sysfs, ts); > if (err) > - return ERR_PTR(err); > + return err; > > err = ad7879_gpio_add(ts, pdata); > if (err) > - return ERR_PTR(err); > + return err; > > err = input_register_device(input_dev); > if (err) > - return ERR_PTR(err); > + return err; > > dev_set_drvdata(dev, ts); > > diff --git a/drivers/input/touchscreen/ad7879.h b/drivers/input/touchscreen/ad7879.h > index d3d2e9dc31ae..7e43066a4b68 100644 > --- a/drivers/input/touchscreen/ad7879.h > +++ b/drivers/input/touchscreen/ad7879.h > @@ -11,13 +11,12 @@ > > #include > > -struct ad7879; > struct device; > struct regmap; > > extern const struct dev_pm_ops ad7879_pm_ops; > > -struct ad7879 *ad7879_probe(struct device *dev, struct regmap *regmap, > - int irq, u16 bustype, u8 devid); > +int ad7879_probe(struct device *dev, struct regmap *regmap, > + int irq, u16 bustype, u8 devid); > > #endif > -- Greetings, Michael -- Analog Devices GmbH Otl-Aicher Strasse 60-64 80807 M?nchen Sitz der Gesellschaft M?nchen, Registergericht M?nchen HRB 40368, Gesch?ftsf?hrer: Peter Kolberg, Ali Raza Husain, Eileen Wynne