From patchwork Fri Jan 6 18:29:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 9501591 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 4774F606E1 for ; Fri, 6 Jan 2017 18:29:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FC771FF8E for ; Fri, 6 Jan 2017 18:29:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 34B6228520; Fri, 6 Jan 2017 18:29:49 +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 2AC1D24560 for ; Fri, 6 Jan 2017 18:29:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031949AbdAFS3f (ORCPT ); Fri, 6 Jan 2017 13:29:35 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34533 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031876AbdAFS3b (ORCPT ); Fri, 6 Jan 2017 13:29:31 -0500 Received: by mail-pf0-f194.google.com with SMTP id y68so30299216pfb.1; Fri, 06 Jan 2017 10:29:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ksp0Y9NlDDI6ooZmS/mL4u3+BQrdnTQblmbimyQP8xE=; b=qaZ5nmEcp93+ipCxa25cOCL9CWLri7X/OnzttwQeMTHZPVy0uW+YAEUz6y0fsCcaLd eAI+34Jl+jEtwFReXB/bbkGVFUcjdoumizoE14PuO0DZetMCBBvnBOYuAKkImYy5pF7/ wXnEfZaTMgJf9O6TKBl0h7ttblsomr0U4hPU6BY0ZGAvnAoaEHVrjDDRzAZ5xRwhLtMb ptHrIT1h4yPBNF8VAN1hnX0Sy9cYYFGc9jpp/TjGHFcQyDOXBOLThaTqPO/bGb2FKbOa xvLjw6IT9OxFH9EBQKtaxjboyVBzHu2Bo0ZGO0MUr4kK1O6wJEhlH89HC9sqfM8SmjtZ OuPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ksp0Y9NlDDI6ooZmS/mL4u3+BQrdnTQblmbimyQP8xE=; b=Op+wB3jvvW3iLdxeh2WmpXfnvdOcDK5oFZmWvkZSKn0balGbzVAMB1zO8yJJg4yyih tZPdMaBYAbDf7zaL4cETAc/8LgdAIcbAEtuC568n7KiryNJP/ICz3Ipb+bXw+n30Jycf 5Lk2U9c4Lk62U9ed3IJWqAJG+C2uKF30+yzWbIx0dywGhkGv0ey+ZBMHQHOlrD5ulWDd 6mGjndW+wLoWOJ/t8DQsKQ8LJ9LBpbbr6JSKjkfZgFz18BVLekiQlqE+/lwPaZqeuVG5 ePEXiYtauE76eha8G+ErXzC0yOObv1SAohjvubpcXLt12jQtoxfW5noNjieS95Z5CX/V NkpQ== X-Gm-Message-State: AIkVDXKME6a/fnK5XzH4tVw9/tmilB3F11Cqiz+aNUrQqgzMRmbNKA4Hnum3asufkV50ww== X-Received: by 10.84.138.165 with SMTP id 34mr169987466plp.20.1483727371202; Fri, 06 Jan 2017 10:29:31 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1311:9597:f6a0:393f:f9f2]) by smtp.gmail.com with ESMTPSA id e127sm3970520pfh.89.2017.01.06.10.29.30 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 06 Jan 2017 10:29:30 -0800 (PST) Date: Fri, 6 Jan 2017 10:29:28 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Thierry Reding , linux-kernel@vger.kernel.org, David Lechner Subject: [PATCH 3/3 v2] Input: pwm-beeper - use input_set_capability() Message-ID: <20170106182928.GA2474@dtor-ws> References: <20170106182050.2772-1-dmitry.torokhov@gmail.com> <20170106182050.2772-3-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170106182050.2772-3-dmitry.torokhov@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 Instead of manipulating capability bits directly, let's use input_set_capability() API. Signed-off-by: Dmitry Torokhov --- drivers/input/misc/pwm-beeper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c index 14c52054f5b7..ce6eec48ec5f 100644 --- a/drivers/input/misc/pwm-beeper.c +++ b/drivers/input/misc/pwm-beeper.c @@ -131,8 +131,8 @@ static int pwm_beeper_probe(struct platform_device *pdev) beeper->input->id.product = 0x0001; beeper->input->id.version = 0x0100; - beeper->input->evbit[0] = BIT(EV_SND); - beeper->input->sndbit[0] = BIT(SND_TONE) | BIT(SND_BELL); + input_set_capability(beeper->input, EV_SND, SND_TONE); + input_set_capability(beeper->input, EV_SND, SND_BELL); beeper->input->event = pwm_beeper_event; beeper->input->close = pwm_beeper_close;