From patchwork Sun Mar 19 04:41:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 71705 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp583586wrt; Sat, 18 Mar 2023 21:57:05 -0700 (PDT) X-Google-Smtp-Source: AK7set8GK2DXYnUPBT+vSn3u4weyNSVOjA8tk/YYwMYNGp8SeSJ3C9/YqeISKund46gyGdd85LpU X-Received: by 2002:a17:90b:1bd2:b0:23f:8752:98c0 with SMTP id oa18-20020a17090b1bd200b0023f875298c0mr3232410pjb.19.1679201824720; Sat, 18 Mar 2023 21:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679201824; cv=none; d=google.com; s=arc-20160816; b=hX7DOO2FqhTQqQGWyWmCif1e/+nc0D4n3RNq2Z0vkFi2NzkOFOxfZKUcQffLAz/1SE A7jixZ2UGqmSyW8Klz8Gf+ghAu0TYVIQpfZyoH/18DLmhtzSuz5NKO3TJtDKZueKERXP uEwS2g4t5EqGbIIMOFCYn+WfTyhHTcnT3rPNwKJ6vJzX84jhpNI/zVFzH5c04np2/uoV zKLiWybTy/nSn0BGtTxPJpBKlw8TLnMskXGy0BuahmNNaaTQBUNVH7tHXtn8B6ZOGH1G Mzd6VmKMsPqG0SomThkdtzk9FyECrvvLh7AU/tCbbjGp+AqChhFXQiW0yKMJQ8zXeJVx x3xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6PuUObMV7JIE67n7ZYn2PDpczkWggqfJ67CwHqi7hzc=; b=r1BkhK/LL68u8qmKJdzf4pYeWJ2sDCZSwh60lgXm9boCfDzvPcwcGDcJ2gchkaj2Wl ashetDAZSQ3fBoAwg2nUw54T120bTWG7ctAJAfwKOaEkkyP3hbyrdeMh4Zyk4V6+WjUj gsPTwD3/c1S7QEMxgyjMvN82K5aCi35cHZJuPe6zv4/Km7xRphEM47CVKLpVtC7WkApZ CJ2A9YZpryxsSSc1+PeU2MYRvFAhUg+FjFaaPihtVWsC8jELaFmcL9y7259PYInWEJ8o zaMHL0DYs98gxCazORyvCFAWPQQf93a1A9lAZtKEK9EG4vKYJz77ldRuIny7g/8edfnB DH3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="LvmB74/4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11-20020a17090a560b00b0023b2b355352si6531834pjf.130.2023.03.18.21.56.43; Sat, 18 Mar 2023 21:57:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b="LvmB74/4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbjCSElp (ORCPT + 99 others); Sun, 19 Mar 2023 00:41:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbjCSElm (ORCPT ); Sun, 19 Mar 2023 00:41:42 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 23E1A1F4A5 for ; Sat, 18 Mar 2023 21:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=6PuUO bMV7JIE67n7ZYn2PDpczkWggqfJ67CwHqi7hzc=; b=LvmB74/4HTVMbBDqcqTx/ maxVgR7swG6ad+8qhlvVzGljUBU6BQ1AI9dKShopQnCA4WTCY76DcBPefzgsX/o/ jKJSaC0bBgfoMsC3w6DqMYeMfNP0glgnuQvF+AZchShYPLYknsacdmhcYX2PhQsY lyfOj/tJlK3OuPfYdm8zio= Received: from lizhe.. (unknown [120.245.132.192]) by zwqz-smtp-mta-g0-2 (Coremail) with SMTP id _____wC3XMFmkhZk7yf1AQ--.13750S4; Sun, 19 Mar 2023 12:41:30 +0800 (CST) From: Lizhe To: zbr@ioremap.net Cc: linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH v1] w1/w1.c : Remove driver match function Date: Sun, 19 Mar 2023 12:41:07 +0800 Message-Id: <20230319044107.311555-1-sensor1010@163.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CM-TRANSID: _____wC3XMFmkhZk7yf1AQ--.13750S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr1kAr4DGr47Kr1kAF4xWFg_yoWDWwc_C3 47Zr97Xrn8Ka4rtFnagFsrZFWIga1vqr48XanYq39aq3W3Xw1rur4UZrsrt34UZrWxJFsI k34DXr4I9r40qjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRZ4SO5UUUUU== X-Originating-IP: [120.245.132.192] X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBlxs3q2I0YaFeJQAAs9 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760770732429753852?= X-GMAIL-MSGID: =?utf-8?q?1760770732429753852?= If there is no driver match function, the driver core assumes that each candidate pair (driver, device) matches, see driver_match_device(). Drop the bus's match function that always returned 1 and so implements the same behaviour as when there is no match function Signed-off-by: Lizhe --- drivers/w1/w1.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 9d199fed9628..e7e42f9dabf4 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -58,11 +58,6 @@ MODULE_PARM_DESC(slave_ttl, DEFINE_MUTEX(w1_mlock); LIST_HEAD(w1_masters); -static int w1_master_match(struct device *dev, struct device_driver *drv) -{ - return 1; -} - static int w1_master_probe(struct device *dev) { return -ENODEV; @@ -174,7 +169,6 @@ static int w1_uevent(const struct device *dev, struct kobj_uevent_env *env); static struct bus_type w1_bus_type = { .name = "w1", - .match = w1_master_match, .uevent = w1_uevent, };