From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A479C433EF for ; Sun, 22 May 2022 19:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351477AbiEVTvn (ORCPT ); Sun, 22 May 2022 15:51:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351357AbiEVTvO (ORCPT ); Sun, 22 May 2022 15:51:14 -0400 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB5933A5FC for ; Sun, 22 May 2022 12:50:48 -0700 (PDT) Date: Sun, 22 May 2022 19:50:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1653249044; x=1653508244; bh=ezBQ8JYOZeSPzQRYI8sNEvLFSFA0gqUVqyugk66GrR4=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:Feedback-ID:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=WiD+IzqNyXBeHy+D0ktqFqdtWupjHckyK2nsD6QgH9UpajKFW8PQNqxsb4wNFxX/g M2tzLSwU5hvCe3plF78c8nBT+o1BDRnIY/syObHxZtUa1t0TzQxBmmljy5CQ5uNDIs IP6ieDH9zRVGUys1/jbKK4mZgCz6LtMNxfRXyTAVv2S5Vv4fBJc52x6jEFbCUdczqw /YIuOQAk8v7YJa8RW+6wYFks3I+Qz+UBc9OZ4zl3Rw4uxXQXY73XTvEK7EYYxkOhQF mVQ5W02SWJBPWn67/BcwPn6E1cQv8fzBVykudLpDv/plVMpquLQjxcxfMQLV18kVEg eHhMgJmj5IGGA== To: Jonathan Corbet From: Nelson Penn Cc: linux-doc@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Nelson Penn Reply-To: Nelson Penn Subject: [PATCH] documentation: Format button_dev as a pointer. Message-ID: <20220522194953.12097-1-nelsonapenn@protonmail.com> Feedback-ID: 19766786:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org The docs on creating an input device driver have an example in which button_dev is a pointer to an input_dev struct. However, in two code snippets below, button_dev is used as if it is not a pointer. Make these occurrences of button_dev reflect that it is a pointer. Signed-off-by: Nelson Penn --- Documentation/input/input-programming.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/input/input-programming.rst b/Documentation/inpu= t/input-programming.rst index 2638dce69764..c9264814c7aa 100644 --- a/Documentation/input/input-programming.rst +++ b/Documentation/input/input-programming.rst @@ -85,15 +85,15 @@ accepted by this input device. Our example device can o= nly generate EV_KEY type events, and from those only BTN_0 event code. Thus we only set these two bits. We could have used:: -=09set_bit(EV_KEY, button_dev.evbit); -=09set_bit(BTN_0, button_dev.keybit); +=09set_bit(EV_KEY, button_dev->evbit); +=09set_bit(BTN_0, button_dev->keybit); as well, but with more than single bits the first approach tends to be shorter. Then the example driver registers the input device structure by calling:: -=09input_register_device(&button_dev); +=09input_register_device(button_dev); This adds the button_dev structure to linked lists of the input driver and calls device handler modules _connect functions to tell them a new input -- 2.25.1