@@ -669,66 +669,6 @@ void amba_device_unregister(struct amba_device *dev)
669669 device_unregister (& dev -> dev );
670670}
671671
672-
673- struct find_data {
674- struct amba_device * dev ;
675- struct device * parent ;
676- const char * busid ;
677- unsigned int id ;
678- unsigned int mask ;
679- };
680-
681- static int amba_find_match (struct device * dev , void * data )
682- {
683- struct find_data * d = data ;
684- struct amba_device * pcdev = to_amba_device (dev );
685- int r ;
686-
687- r = (pcdev -> periphid & d -> mask ) == d -> id ;
688- if (d -> parent )
689- r &= d -> parent == dev -> parent ;
690- if (d -> busid )
691- r &= strcmp (dev_name (dev ), d -> busid ) == 0 ;
692-
693- if (r ) {
694- get_device (dev );
695- d -> dev = pcdev ;
696- }
697-
698- return r ;
699- }
700-
701- /**
702- * amba_find_device - locate an AMBA device given a bus id
703- * @busid: bus id for device (or NULL)
704- * @parent: parent device (or NULL)
705- * @id: peripheral ID (or 0)
706- * @mask: peripheral ID mask (or 0)
707- *
708- * Return the AMBA device corresponding to the supplied parameters.
709- * If no device matches, returns NULL.
710- *
711- * NOTE: When a valid device is found, its refcount is
712- * incremented, and must be decremented before the returned
713- * reference.
714- */
715- struct amba_device *
716- amba_find_device (const char * busid , struct device * parent , unsigned int id ,
717- unsigned int mask )
718- {
719- struct find_data data ;
720-
721- data .dev = NULL ;
722- data .parent = parent ;
723- data .busid = busid ;
724- data .id = id ;
725- data .mask = mask ;
726-
727- bus_for_each_dev (& amba_bustype , NULL , & data , amba_find_match );
728-
729- return data .dev ;
730- }
731-
732672/**
733673 * amba_request_regions - request all mem regions associated with device
734674 * @dev: amba_device structure for device
@@ -768,6 +708,5 @@ EXPORT_SYMBOL(amba_driver_register);
768708EXPORT_SYMBOL (amba_driver_unregister );
769709EXPORT_SYMBOL (amba_device_register );
770710EXPORT_SYMBOL (amba_device_unregister );
771- EXPORT_SYMBOL (amba_find_device );
772711EXPORT_SYMBOL (amba_request_regions );
773712EXPORT_SYMBOL (amba_release_regions );
0 commit comments