From patchwork Sat Mar 31 11:21:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 10318929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8884460212 for ; Sat, 31 Mar 2018 11:22:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DC4929502 for ; Sat, 31 Mar 2018 11:22:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 61EF52950A; Sat, 31 Mar 2018 11:22:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AF9429502 for ; Sat, 31 Mar 2018 11:22:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752849AbeCaLWj (ORCPT ); Sat, 31 Mar 2018 07:22:39 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:38602 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbeCaLWL (ORCPT ); Sat, 31 Mar 2018 07:22:11 -0400 Received: by mail-lf0-f67.google.com with SMTP id u3-v6so15248576lff.5; Sat, 31 Mar 2018 04:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Mfp0bxxUaHDwv84aqO3mWdcvIyMbOeKIfHXAh3C0c98=; b=GSvoENcIeOq7bjUEhOLoHb4PbkcSUoJ0mlhcM4HBwB1uVjnTYdQN4IHdw/jDJTXxwY 5g3zrrtNd1WjjEWgocoUA4rTnQM180g1Q0oLI3yRy2x0vtEEoNbt11gCQ6AY9YARtk/5 MF9mpBvqSVpkYvKwKjVSB4HShaa87ZLc5N2NOYnNJBeicU5UQL+VTXDzelsp47IYsjsY aWpueZFT/P3jNpvTiD1yAARFFUbUwGOQT2J17XCaW7MCDFNE+/KJvHKvIIRhUuc+DeTf LxqwE1Ew46tPo8XxaZhLEBQScURXgOoRaY9su8zobooRHAaDsT0p1VE9n5A2tYOmZFFZ rNzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Mfp0bxxUaHDwv84aqO3mWdcvIyMbOeKIfHXAh3C0c98=; b=m+bcrJNyPEG7HOGxcADqF6+Pwgk9o/RVk+IlEnzDw9Go3FCtiuq8qilYU7P7hR3bKM oOFwqD+fNRyV3yqCtS5+4BQ5V4DefUznaC+P4w0SJGbMXiek5bxyOoEaJWAAT/jSsA0U /dgTZdigJ3h8VOOXMJkLZO7Whcu7vuW1LHRXStuPNL4B2Gu4JLU/zUKJZHKlrK68q5/g i4htcjdkgIm6cc5RdHUv737pig8Z9016dUucrfsoE14OkA9dgzac9r4tgKG/hrMvxfYF drvqaoAFeEK8qoIphjehGr84DED7Fl20aZPLx1WOoA0bBOXAZGZT2eYjjYPJn2sLQjhE 0Pcg== X-Gm-Message-State: ALQs6tD01QyXyvnXn0Eel6KebHIIqBdkZ4obGIafXs7Aixjve/p2EgAl XG9FqWnBmoFMuDGEAYDf4Mk= X-Google-Smtp-Source: AIpwx49SplD2Rv5GuD7SPe81Wt2+NNxvPg5SfcBN1t6ss5VYy0Sf5rm6wUJgmnnXkhRS8o0wJk+Svw== X-Received: by 10.46.153.142 with SMTP id w14mr1631014lji.116.1522495330379; Sat, 31 Mar 2018 04:22:10 -0700 (PDT) Received: from localhost.localdomain (c-2ec2e1fc-74736162.cust.telenor.se. [46.194.225.252]) by smtp.gmail.com with ESMTPSA id e11sm1813218ljb.46.2018.03.31.04.22.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Mar 2018 04:22:09 -0700 (PDT) From: Marcus Folkesson To: Dmitry Torokhov Cc: Marcus Folkesson , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] input: as5011: avoid using __set_bit() for capabilities Date: Sat, 31 Mar 2018 13:21:41 +0200 Message-Id: <20180331112143.18768-2-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180331112143.18768-1-marcus.folkesson@gmail.com> References: <20180331112143.18768-1-marcus.folkesson@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP input_set_capability() and input_set_abs_param() will do it for you. Signed-off-by: Marcus Folkesson --- drivers/input/joystick/as5011.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c index 005d852a06e9..f051993c568e 100644 --- a/drivers/input/joystick/as5011.c +++ b/drivers/input/joystick/as5011.c @@ -269,9 +269,7 @@ static int as5011_probe(struct i2c_client *client, input_dev->id.bustype = BUS_I2C; input_dev->dev.parent = &client->dev; - __set_bit(EV_KEY, input_dev->evbit); - __set_bit(EV_ABS, input_dev->evbit); - __set_bit(BTN_JOYSTICK, input_dev->keybit); + input_set_capability(input_dev, EV_KEY, BTN_JOYSTICK); input_set_abs_params(input_dev, ABS_X, AS5011_MIN_AXIS, AS5011_MAX_AXIS, AS5011_FUZZ, AS5011_FLAT);