Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1406654imm; Wed, 26 Sep 2018 17:49:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV60dpJUj4iP96GrvJMNllFICtjlLRP8m3JYs8DbZj1307kCHqmnv5rKzp2OfsHRNpjtsnh8n X-Received: by 2002:a17:902:6a4:: with SMTP id 33-v6mr1198198plh.11.1538009362314; Wed, 26 Sep 2018 17:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538009362; cv=none; d=google.com; s=arc-20160816; b=P9jAjRzK2EvH6F87uDnYYdQ/haQpJUoUBe+Y8UVqkbphSC45N7JUXO1O33cjY2E5gH gsnZmUsL2HXO0G8Hn0HvpgsIpcVDvj+ipm/QpkOtHiPNmLJ7Al3reG3OK9Kgvc6zzLT0 V4CoNtielsZi0o+1am8LOGz/5x6B7yKlWl8EAoHa2PYXCPt8syWmgWwVPlFUK9jW5Q1f 7ubd45GFHB6nrj3diyv4Ocytfyz6HOYYvD/dIYcrkBB1r2bmPZZSb2nA533kvi1XLrEJ behlNHnFxb6aaImWqj1lPkIkwDF4kEGorDcOdevOWx6FGjRuEVOnQwFv9lBSk1u0vMDl sctw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fWYnNtZ4a6D8LyJB9LjwUCYzhe7IWzyM7UwIqps5/hs=; b=NbkUUjqE/DhDs5z2aVUgaIe22EfZzCC5Rp6zMc+iAeNSUJf3YB111J10qdMu1Pg36a oX3kklNu0PiaUn8nCp+a3MKA6nzUQE+YKuL+bkg1c9LMx3oHEPmMqnsdOmC+ik66PYV2 Kt56BwpKpdCdC5lUzmeVEuvN5VSe75O5SOPhgA/7FGX2IhPcGce6O7hBQRMZ0fAHadUy ZStGZo4ml7AfOOz5S3M3sx9pds+r7RaZnsNUGnLBJ83pADdDrIgyrjIQ9UHy4spCHIj+ fUgCDh+Z1kyk8pUttjQNOt4dzsjsLU7S+tb9HXxFCOALgGD7A4ZYAl6xL/RtNXezs3xv /lVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SRhFElSo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d31-v6si384816pla.256.2018.09.26.17.49.07; Wed, 26 Sep 2018 17:49:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SRhFElSo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbeI0HE2 (ORCPT + 99 others); Thu, 27 Sep 2018 03:04:28 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:37449 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726959AbeI0HE1 (ORCPT ); Thu, 27 Sep 2018 03:04:27 -0400 Received: by mail-pg1-f196.google.com with SMTP id c10-v6so576680pgq.4 for ; Wed, 26 Sep 2018 17:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fWYnNtZ4a6D8LyJB9LjwUCYzhe7IWzyM7UwIqps5/hs=; b=SRhFElSocMu8D3UWzkzHzHJ3uZfTcieZLbfnUE33wZ/jqaT9n7P4DfXlelYrhJoGhn micCEpRenFOghg0cMhxnDPWbhTm6s1mEuWSOClzeRH+3/4rby4zBZRvdg+2X0rDs3DK+ pGgOHFbNS5L6XZJCExxxozvMtH2VGpzXOfCO0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fWYnNtZ4a6D8LyJB9LjwUCYzhe7IWzyM7UwIqps5/hs=; b=rmDLmmNOo+BcnUuQ6x5TpfckGDluM+Ses/tO29kexqVSXagYNiFCsmd4otD7zUOCKI 1IeCcyYzuCmb3BW0lEVSCwAXpIohpLeMB9b75JSya/rzzK1kuVhrSxWlitr9AkDEiBYd XYVK76PVoBQ7GiJR+T7nHrIYCAbzHi9/GSuKr76K/u/wFuyCLwrrtV6W4vQ5pdzjfqAS csgoig1n37CsZMeND/MUDJBtMz0z+0GCUMjMg1JH0sGd8RcDDzJuoDPRcCVWsTVqKNY0 32lUnMhoghOHrwqQq44tbFce4LqZ2aBPluL5KzSdDlvZ4I2risAmB/t31ny2PD4y2RE9 +8bg== X-Gm-Message-State: ABuFfoh4HkP5l2M05I6uHslnwjOFqxCjMqPTr89//miZcviCbkb0MFXV OnGypthAZsMwfbDOWDRckWE3QA== X-Received: by 2002:a62:9402:: with SMTP id m2-v6mr8503794pfe.3.1538009332749; Wed, 26 Sep 2018 17:48:52 -0700 (PDT) Received: from mka.mtv.corp.google.com ([2620:15c:202:1:b6af:f85:ed6c:ac6a]) by smtp.gmail.com with ESMTPSA id g3-v6sm404173pfi.9.2018.09.26.17.48.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 17:48:52 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , "Rafael J . Wysocki" , Sakari Ailus , Marcin Wojtas , Andy Shevchenko Andy Shevchenko , Sinan Kaya , Marcel Holtmann , Johan Hedberg Cc: linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Balakrishna Godavarthi , Loic Poulain , Brian Norris , Matthias Kaehlcke Subject: [PATCH v4 2/2] Bluetooth: btqcomsmd: Get the BD address with device_get_bd_address() Date: Wed, 26 Sep 2018 17:48:10 -0700 Message-Id: <20180927004810.124185-3-mka@chromium.org> X-Mailer: git-send-email 2.19.0.605.g01d371f741-goog In-Reply-To: <20180927004810.124185-1-mka@chromium.org> References: <20180927004810.124185-1-mka@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the new API to get the BD address instead of reading it directly from the device tree. Also remove an unncessary pair of braces in the same area of code. Signed-off-by: Matthias Kaehlcke Reviewed-by: Andy Shevchenko Reviewed-by: Sakari Ailus --- Changes in v4: - added 'Reviewed-by: Sakari Ailus ' tag Changes in v3: - added 'Reviewed-by: Andy Shevchenko ' tag Changes in v2: - pass bdaddr_t instead of byte pointer + len --- drivers/bluetooth/btqcomsmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/bluetooth/btqcomsmd.c b/drivers/bluetooth/btqcomsmd.c index 7df3eed1ef5e..ff74d2c46991 100644 --- a/drivers/bluetooth/btqcomsmd.c +++ b/drivers/bluetooth/btqcomsmd.c @@ -172,11 +172,9 @@ static int btqcomsmd_probe(struct platform_device *pdev) /* The local-bd-address property is usually injected by the * bootloader which has access to the allocated BD address. */ - if (!of_property_read_u8_array(pdev->dev.of_node, "local-bd-address", - (u8 *)&btq->bdaddr, sizeof(bdaddr_t))) { + if (!device_get_bd_address(&pdev->dev, &btq->bdaddr)) dev_info(&pdev->dev, "BD address %pMR retrieved from device-tree", &btq->bdaddr); - } hdev = hci_alloc_dev(); if (!hdev) -- 2.19.0.605.g01d371f741-goog