@@ -321,20 +321,6 @@ static int instantiate_rng(struct device *ctrldev, int state_handle_mask,
321321 return ret ;
322322}
323323
324- static int caam_remove (struct platform_device * pdev )
325- {
326- struct device * ctrldev ;
327- struct caam_drv_private * ctrlpriv ;
328-
329- ctrldev = & pdev -> dev ;
330- ctrlpriv = dev_get_drvdata (ctrldev );
331-
332- /* Remove platform devices under the crypto node */
333- of_platform_depopulate (ctrldev );
334-
335- return 0 ;
336- }
337-
338324/*
339325 * kick_trng - sets the various parameters for enabling the initialization
340326 * of the RNG4 block in CAAM
@@ -761,7 +747,7 @@ static int caam_probe(struct platform_device *pdev)
761747#endif
762748 }
763749
764- ret = of_platform_populate ( nprop , caam_match , NULL , dev );
750+ ret = devm_of_platform_populate ( dev );
765751 if (ret ) {
766752 dev_err (dev , "JR platform devices creation error\n" );
767753 return ret ;
@@ -783,8 +769,7 @@ static int caam_probe(struct platform_device *pdev)
783769 /* If no QI and no rings specified, quit and go home */
784770 if ((!ctrlpriv -> qi_present ) && (!ctrlpriv -> total_jobrs )) {
785771 dev_err (dev , "no queues configured, terminating\n" );
786- ret = - ENOMEM ;
787- goto caam_remove ;
772+ return - ENOMEM ;
788773 }
789774
790775 if (ctrlpriv -> era < 10 )
@@ -847,7 +832,7 @@ static int caam_probe(struct platform_device *pdev)
847832 } while ((ret == - EAGAIN ) && (ent_delay < RTSDCTL_ENT_DLY_MAX ));
848833 if (ret ) {
849834 dev_err (dev , "failed to instantiate RNG" );
850- goto caam_remove ;
835+ return ret ;
851836 }
852837 /*
853838 * Set handles init'ed by this module as the complement of the
@@ -921,10 +906,6 @@ static int caam_probe(struct platform_device *pdev)
921906 & ctrlpriv -> ctl_tdsk_wrap );
922907#endif
923908 return 0 ;
924-
925- caam_remove :
926- caam_remove (pdev );
927- return ret ;
928909}
929910
930911static struct platform_driver caam_driver = {
@@ -933,7 +914,6 @@ static struct platform_driver caam_driver = {
933914 .of_match_table = caam_match ,
934915 },
935916 .probe = caam_probe ,
936- .remove = caam_remove ,
937917};
938918
939919module_platform_driver (caam_driver );
0 commit comments