Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp434768pxb; Fri, 29 Oct 2021 12:41:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiAvB1s+C3mwUL0V3oDFSqWAdxwIyf+2d98LBs+B3K3UCsYTHPVvjj+yR2UMpZAcw2qtKQ X-Received: by 2002:a05:6e02:1a69:: with SMTP id w9mr8570338ilv.1.1635536518984; Fri, 29 Oct 2021 12:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635536518; cv=none; d=google.com; s=arc-20160816; b=WHOIrsbrQ5/C3LPr5uythUQ0MatsvaAzL9pqNW7ZTL3prZMwgRBE1m8l+V34e/rwUh KanZuMXQ1FMOWqs85K9s01cjYQ1bY2fQeLzgrMFqpQCD+peq51xrYL1IkLE6TF7zdHnf fV00kiicnWS+d+JvNrH9c7Zy2/rxkIXozovyrpCRNb9WyLOgL5kBJRK/Fg6Lf20G2+zz Xk4Li6gGMA3ujNwQ1CgCp9aB7q95ca8rekCZ7AWUSSPorYMXk5svfMpBzw+2ngoN2Z2M mxkGWF/7UFnphA/2U8v3As0/yKV/tNPqKMybQvXAZpK7+VzSBV5Rt7vaNVq2hLXlOjMl 3bow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vZm9A2T24RE3QB1vLk0UMA+gWOq1n7UkyGpi6SN/IHE=; b=hVSrepeitID+aPD1Y+WLl30NupcmzBQSmQQcUSBwHmO/VG/eOzmqqLQjZUZsH+ExIj baWEjJF5wzy1lnXkGBwxBMj4ssa/y5jQX5p4tplfYdxsAHzhZArwGO9xebg9Expmsy9K sbZBOTAekjJGdzdGqNbAGYo8aV96h7UWjGOIYAUsz3S0LGgdT6d0Vhl2BBgJ/g2j2RHc d9+tFkyCdZJUJi0KaWF2k1iwAtsbLxl+AgVmb5/g1TcfVP3xSgVTb7bTsTs50Bv7uiq9 VeSODIwMu5O+CQev/7Jf+4AL5mKwDX1XZYGMOjZAnll7X6fC+iAhG0D0tU9iokQUPn5m bZIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YceGVtW3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si10518551ilv.155.2021.10.29.12.41.47; Fri, 29 Oct 2021 12:41:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YceGVtW3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231245AbhJ2Tme (ORCPT + 99 others); Fri, 29 Oct 2021 15:42:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbhJ2Tmb (ORCPT ); Fri, 29 Oct 2021 15:42:31 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40E9AC061570; Fri, 29 Oct 2021 12:40:02 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id s13so10964252wrb.3; Fri, 29 Oct 2021 12:40:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=vZm9A2T24RE3QB1vLk0UMA+gWOq1n7UkyGpi6SN/IHE=; b=YceGVtW30AVsOVXYivUXmm3i8/mNJJ0W8Ptgcrjp3qB/O4WwM1ITTAoczMwseKeeCg +vblbOi3NdZPcbhPrVNdKlChdv+z1F1G9AWJAzrBRP1IKZ25MiVpw+yKC4TZp9JZQMxG 4m885QhW+uc93ulrTlxw6EwFcE8q7YMmKFfbzoHuCorXqsrBJbalVXn3H/E2euxWrOzz f8rICvbqVnOtZXEBtttifSE7ts42hcW51QIqp4HFHI5Q6YyeTNrAzhwAUdiwnUHGXDaf hr23zeqY/UCIehaxQOpU7TQTea2L2wY523VL+vbJ4sNM4wWzYNZRLoIbLNY4G8sZAWfN A5TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vZm9A2T24RE3QB1vLk0UMA+gWOq1n7UkyGpi6SN/IHE=; b=JE8200Pyjfw91VNGwPHb01cKncYek/b4EUtBQQjHq0YiuI/LVxrfPz3ckFXoOmC1Gk R/QD5WDTDmePIUb9i77t5tRGUM3K2dhh5QeLdUZ9DJmRAAvNlXqr77E6nWnNGMuQLknH eJlFQbvh3jjRhhF21fcvBBAgWJz0TmHj9DVgR0c2S7j9FLQERdM/i9bpENdlH1cpTen0 I+MHEDHy8tmAIqHs9NNW1LLJ/WtZaOxYr8wLAcQcNUlQFHBCPN7deowh3zDcRCr65UAC C/IV5ou9pSBrt/Tquzd/5jQx+F4cmYg3BiCoVK6pOcoB834VPKIogD8849HndZxm+wD6 uF2w== X-Gm-Message-State: AOAM532y/mK8SGbACn2YR6gm7wsM929X9M6zPRxnSTROfnnpraAkxIKf c7zGv1HDu9y+Y+jebbQGOaqKlfAfVVU= X-Received: by 2002:a05:600c:796:: with SMTP id z22mr13375932wmo.188.1635536400933; Fri, 29 Oct 2021 12:40:00 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p200300c78f4e06341d0f9ebdf4bbe019.dip0.t-ipconnect.de. [2003:c7:8f4e:634:1d0f:9ebd:f4bb:e019]) by smtp.gmail.com with ESMTPSA id f7sm7668646wmg.14.2021.10.29.12.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 12:40:00 -0700 (PDT) Date: Fri, 29 Oct 2021 21:39:58 +0200 From: Philipp Hortmann To: corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org Subject: [PATCH 2/3] Docs: usb: update comment and code near increment usage count Message-ID: <53328d28190d987dc0ac5b455014bfe32cf39a64.1635533924.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org update comment: increment our usage count .. and code according to usb-skeleton.c Signed-off-by: Philipp Hortmann --- Documentation/driver-api/usb/writing_usb_driver.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/driver-api/usb/writing_usb_driver.rst b/Documentation/driver-api/usb/writing_usb_driver.rst index 5c29e5bdbe88..14eda0342649 100644 --- a/Documentation/driver-api/usb/writing_usb_driver.rst +++ b/Documentation/driver-api/usb/writing_usb_driver.rst @@ -167,8 +167,8 @@ structure. This is done so that future calls to file operations will enable the driver to determine which device the user is addressing. All of this is done with the following code:: - /* increment our usage count for the module */ - ++skel->open_count; + /* increment our usage count for the device */ + kref_get(&dev->kref); /* save our object in the file's private structure */ file->private_data = dev; -- 2.25.1