From patchwork Mon Jan 15 12:08:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 860844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zKsbF1Wpcz9rxj for ; Mon, 15 Jan 2018 23:09:13 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932252AbeAOMJL (ORCPT ); Mon, 15 Jan 2018 07:09:11 -0500 Received: from 178.115.242.59.static.drei.at ([178.115.242.59]:43767 "EHLO mail.osadl.at" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932121AbeAOMJK (ORCPT ); Mon, 15 Jan 2018 07:09:10 -0500 Received: by mail.osadl.at (Postfix, from userid 1001) id 733A75C11B5; Mon, 15 Jan 2018 12:08:50 +0000 (UTC) From: Nicholas Mc Guire To: Wolfram Sang Cc: Jonathan Corbet , linux-i2c@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] Documentation: i2c: drop unnecessary .owner field in examples Date: Mon, 15 Jan 2018 12:08:46 +0000 Message-Id: <1516018126-16119-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org From: Nicholas Mc Guire Currently there are a few drivers that still set the .owner in the i2c_driver structure - all of which are reported by coccinelle (scripts/coccinelle/api/platform_no_drv_owner.cocci) and there are no cases that set the .onwer and do not call any of the functions that set the .owner field anyway in any of the drivers (checked by a modified coccinelle script based on the above) so it seems that the examples are no longer valid and .owner = THIS_MODULE, can be removed here. While at it an obvious typo (new new) was also fixed. Signed-off-by: Nicholas Mc Guire --- Patch is against 4.15-rc7 (localversion-next is -next-20180112) Documentation/i2c/upgrading-clients | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Documentation/i2c/upgrading-clients b/Documentation/i2c/upgrading-clients index ccba3ff..d5e51ae 100644 --- a/Documentation/i2c/upgrading-clients +++ b/Documentation/i2c/upgrading-clients @@ -7,7 +7,7 @@ Introduction ------------ This guide outlines how to alter existing Linux 2.6 client drivers from -the old to the new new binding methods. +the old to the new binding methods. Example old-style driver @@ -77,7 +77,6 @@ static int example_attach_adapter(struct i2c_adapter *adap) static struct i2c_driver example_driver = { .driver = { - .owner = THIS_MODULE, .name = "example", .pm = &example_pm_ops, }, @@ -217,7 +216,6 @@ and other utilities: static struct i2c_driver example_driver = { .driver = { - .owner = THIS_MODULE, .name = "example", }, + .id_table = example_ids, @@ -269,7 +267,6 @@ MODULE_DEVICE_TABLE(i2c, example_idtable); static struct i2c_driver example_driver = { .driver = { - .owner = THIS_MODULE, .name = "example", .pm = &example_pm_ops, },