Lines Matching refs:smdev
704 struct sm501_device *smdev; in sm501_create_subdev() local
706 smdev = kzalloc(sizeof(struct sm501_device) + in sm501_create_subdev()
709 if (!smdev) in sm501_create_subdev()
712 smdev->pdev.dev.release = sm501_device_release; in sm501_create_subdev()
714 smdev->pdev.name = name; in sm501_create_subdev()
715 smdev->pdev.id = sm->pdev_id; in sm501_create_subdev()
716 smdev->pdev.dev.parent = sm->dev; in sm501_create_subdev()
719 smdev->pdev.resource = (struct resource *)(smdev+1); in sm501_create_subdev()
720 smdev->pdev.num_resources = res_count; in sm501_create_subdev()
723 smdev->pdev.dev.platform_data = (void *)(smdev+1); in sm501_create_subdev()
725 return &smdev->pdev; in sm501_create_subdev()
736 struct sm501_device *smdev = to_sm_device(pdev); in sm501_register_device() local
749 list_add_tail(&smdev->list, &sm->devices); in sm501_register_device()
1670 struct sm501_device *smdev) in sm501_remove_sub() argument
1672 list_del(&smdev->list); in sm501_remove_sub()
1673 platform_device_unregister(&smdev->pdev); in sm501_remove_sub()
1678 struct sm501_device *smdev, *tmp; in sm501_dev_remove() local
1680 list_for_each_entry_safe(smdev, tmp, &sm->devices, list) in sm501_dev_remove()
1681 sm501_remove_sub(sm, smdev); in sm501_dev_remove()