qcacld-3.0: Use published methods to reset pdev ospriv

Currently hdd_release_and_destroy_pdev() retrieves and resets the
pdev's ospriv data pointer by directly dereferencing the pdev
object. This is not the correct object-oriented approach. Instead of
dereferencing the object, invoke the wlan_pdev_get_ospriv() and
wlan_pdev_reset_ospriv() methods that exists for this purpose.

Change-Id: I71a5d090648b76261d863a0b0168a83cdf9911b3
CRs-Fixed: 2024022
This commit is contained in:
Jeff Johnson 2017-03-23 13:26:10 -07:00 • committed by Sandeep Puligilla
commit ae6bb80915

View file

@ -127,8 +127,8 @@ int hdd_objmgr_release_and_destroy_pdev(hdd_context_t *hdd_ctx)
if (!pdev)
return -EINVAL;
osif_priv = pdev->pdev_nif.pdev_ospriv;
pdev->pdev_nif.pdev_ospriv = NULL;
osif_priv = wlan_pdev_get_ospriv(pdev);
wlan_pdev_reset_ospriv(pdev);
qdf_mem_free(osif_priv);
return qdf_status_to_os_return(wlan_objmgr_pdev_obj_delete(pdev));