Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2253389imm; Thu, 27 Sep 2018 09:44:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV638GFysj6E89L/HBolUeidAyWdOtQH/C5jel/sZkg6HNc8GZy7JQvSBGN4bBkjIk99sLdVl X-Received: by 2002:a63:4658:: with SMTP id v24-v6mr7233702pgk.425.1538066676842; Thu, 27 Sep 2018 09:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538066676; cv=none; d=google.com; s=arc-20160816; b=JanOqXA7GXEAXJINjF7qxh/Ahsqg5jxC6kl34fILfqhp9mxNq8OoPIJOa9zrG7pEB1 pxAKBjcQoruZifmFnJUcoZgtW12rzicq3bvBNRPqSVRpdG/P/KbgksLemdywFuAasJXr cSubgoOuXZpPMKG1bY0V3LqdEqmBwtwLeok45uEWV5FS+290vlhOlFT7r4KBN1E+qLf5 Kq0EwTNmA7M+dgjrnMhd7eIDE+lVV0t6+BPyKvkNvlaOmwB/JuEPMbUfll6DOBU0UWrI m1SLrsdPMW+LCP4mWI3eH/aVLv0RSNy1Ub5ElN4YhthbDAN7vTZiyySbnal2X+ducNOL rZdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=ve3uV/A64kX4BM37vQAD2bMTMVGOxNTOSc3LCRDXDqk=; b=QJU+gI5B/4vCRzqy3byKaZYfTMg3xmjgUdYW0IvF4XYDtr1ZD0mSaBfIQ8VFbTHDJ0 Iz3R82pLhCktjIcnazgIU8MOw1yyY3tZB9EYkwJHf/OjqaqP9SvDfmqkLxX3TorXJpIu 9ohBnIqG9AEBlaDMyYOep0b3oiOoK8K+mx1ulNODRxZczejwnK/TSA2PuVWxzO9PsNOa qWavs5iKTjX6sVBNofRXvOZKlKFrBE+sFw0Xidega7DRIvXc2QVTNUpuQe9hW3DUFexI 03N/j9e0LgO0JLlJ9JP5dVTimHgYeY6lSICcKUMLADOC52A07Yhog5ZKQjZVp3A1fyuB 68Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=nbkr8hUe; dkim=pass header.i=@codeaurora.org header.s=default header.b=X6d0qcBL; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y20-v6si2368187plr.110.2018.09.27.09.44.20; Thu, 27 Sep 2018 09:44:36 -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=@codeaurora.org header.s=default header.b=nbkr8hUe; dkim=pass header.i=@codeaurora.org header.s=default header.b=X6d0qcBL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728359AbeI0XCk (ORCPT + 99 others); Thu, 27 Sep 2018 19:02:40 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48704 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727212AbeI0XCk (ORCPT ); Thu, 27 Sep 2018 19:02:40 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id AFF6960B7F; Thu, 27 Sep 2018 16:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538066612; bh=JgyS7sK/VBHt5d9FJyRb2iIu9DA332bCHcB345Kqdlk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nbkr8hUeiTjqPIfqjrqPmKe6QYYtozevxIQs27+4MYuVBGTd5626uVpO9d/9Nh8g0 9tczN+6fUPH5PvVnjLwYcuxdw1s8RJA52oUO6kagi5pE4hV6m3w8QHdskV+55gTMUe wmNiixlq90QTjHCqASU/Cwk9llLd4NETM1K1Pf0E= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 6CD16607DD; Thu, 27 Sep 2018 16:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538066611; bh=JgyS7sK/VBHt5d9FJyRb2iIu9DA332bCHcB345Kqdlk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=X6d0qcBLcNv5k73U3WdM45Yp4o0wKmk7YtVxRpAG8iyx59pohVbL4e68GE+TAR8Hv NNCE5seogCvuK0FZ9nwGgWmP6FLxrAo8icwhCyqOaUYfVgWi3POiiM9QketgNz8vSX D+hmGsOGGNH7ef9EkaQoPEa9JQ6KPOdnBOPFjy6Y= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 27 Sep 2018 22:13:31 +0530 From: Balakrishna Godavarthi To: Matthias Kaehlcke Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , Sakari Ailus , Marcin Wojtas , Andy Shevchenko Andy Shevchenko , Sinan Kaya , Marcel Holtmann , Johan Hedberg , linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, Loic Poulain , Brian Norris Subject: Re: [PATCH v4 2/2] Bluetooth: btqcomsmd: Get the BD address with device_get_bd_address() In-Reply-To: <20180927004810.124185-3-mka@chromium.org> References: <20180927004810.124185-1-mka@chromium.org> <20180927004810.124185-3-mka@chromium.org> Message-ID: <32aa77b08ef306d017b615cd270e3529@codeaurora.org> X-Sender: bgodavar@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthias, On 2018-09-27 06:18, Matthias Kaehlcke wrote: > 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) Reviewed-by: Balakrishna Godavarthi -- Regards Balakrishna.