Skip to content

Commit 78277d7

Browse files
jwrdegoedeholtmann
authored andcommitted
Bluetooth: hci_bcm: Make suspend/resume functions platform_dev independent
Use dev_get_drvdata instead of platform_get_drvdata in the suspend / resume functions. This is a preparation patch for adding (runtime)pm support to the serdev path. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 9d54fd6 commit 78277d7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/bluetooth/hci_bcm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ static struct sk_buff *bcm_dequeue(struct hci_uart *hu)
558558
#ifdef CONFIG_PM
559559
static int bcm_suspend_device(struct device *dev)
560560
{
561-
struct bcm_device *bdev = platform_get_drvdata(to_platform_device(dev));
561+
struct bcm_device *bdev = dev_get_drvdata(dev);
562562

563563
bt_dev_dbg(bdev, "");
564564

@@ -581,7 +581,7 @@ static int bcm_suspend_device(struct device *dev)
581581

582582
static int bcm_resume_device(struct device *dev)
583583
{
584-
struct bcm_device *bdev = platform_get_drvdata(to_platform_device(dev));
584+
struct bcm_device *bdev = dev_get_drvdata(dev);
585585

586586
bt_dev_dbg(bdev, "");
587587

@@ -606,7 +606,7 @@ static int bcm_resume_device(struct device *dev)
606606
/* Platform suspend callback */
607607
static int bcm_suspend(struct device *dev)
608608
{
609-
struct bcm_device *bdev = platform_get_drvdata(to_platform_device(dev));
609+
struct bcm_device *bdev = dev_get_drvdata(dev);
610610
int error;
611611

612612
bt_dev_dbg(bdev, "suspend: is_suspended %d", bdev->is_suspended);
@@ -638,7 +638,7 @@ static int bcm_suspend(struct device *dev)
638638
/* Platform resume callback */
639639
static int bcm_resume(struct device *dev)
640640
{
641-
struct bcm_device *bdev = platform_get_drvdata(to_platform_device(dev));
641+
struct bcm_device *bdev = dev_get_drvdata(dev);
642642

643643
bt_dev_dbg(bdev, "resume: is_suspended %d", bdev->is_suspended);
644644

0 commit comments

Comments
 (0)