@@ -3941,15 +3941,14 @@ EXPORT_SYMBOL(pci_release_region);
39413941 * __pci_request_region - Reserved PCI I/O and memory resource
39423942 * @pdev: PCI device whose resources are to be reserved
39433943 * @bar: BAR to be reserved
3944- * @res_name: Name to be associated with resource.
3944+ * @name: name of the driver requesting the resource
39453945 * @exclusive: whether the region access is exclusive or not
39463946 *
39473947 * Returns: 0 on success, negative error code on failure.
39483948 *
3949- * Mark the PCI region associated with PCI device @pdev BAR @bar as
3950- * being reserved by owner @res_name. Do not access any
3951- * address inside the PCI regions unless this call returns
3952- * successfully.
3949+ * Mark the PCI region associated with PCI device @pdev BAR @bar as being
3950+ * reserved by owner @name. Do not access any address inside the PCI regions
3951+ * unless this call returns successfully.
39533952 *
39543953 * If @exclusive is set, then the region is marked so that userspace
39553954 * is explicitly not allowed to map the resource via /dev/mem or
@@ -3959,25 +3958,25 @@ EXPORT_SYMBOL(pci_release_region);
39593958 * message is also printed on failure.
39603959 */
39613960static int __pci_request_region (struct pci_dev * pdev , int bar ,
3962- const char * res_name , int exclusive )
3961+ const char * name , int exclusive )
39633962{
39643963 if (pci_is_managed (pdev )) {
39653964 if (exclusive == IORESOURCE_EXCLUSIVE )
3966- return pcim_request_region_exclusive (pdev , bar , res_name );
3965+ return pcim_request_region_exclusive (pdev , bar , name );
39673966
3968- return pcim_request_region (pdev , bar , res_name );
3967+ return pcim_request_region (pdev , bar , name );
39693968 }
39703969
39713970 if (pci_resource_len (pdev , bar ) == 0 )
39723971 return 0 ;
39733972
39743973 if (pci_resource_flags (pdev , bar ) & IORESOURCE_IO ) {
39753974 if (!request_region (pci_resource_start (pdev , bar ),
3976- pci_resource_len (pdev , bar ), res_name ))
3975+ pci_resource_len (pdev , bar ), name ))
39773976 goto err_out ;
39783977 } else if (pci_resource_flags (pdev , bar ) & IORESOURCE_MEM ) {
39793978 if (!__request_mem_region (pci_resource_start (pdev , bar ),
3980- pci_resource_len (pdev , bar ), res_name ,
3979+ pci_resource_len (pdev , bar ), name ,
39813980 exclusive ))
39823981 goto err_out ;
39833982 }
@@ -3994,14 +3993,13 @@ static int __pci_request_region(struct pci_dev *pdev, int bar,
39943993 * pci_request_region - Reserve PCI I/O and memory resource
39953994 * @pdev: PCI device whose resources are to be reserved
39963995 * @bar: BAR to be reserved
3997- * @res_name: Name to be associated with resource
3996+ * @name: name of the driver requesting the resource
39983997 *
39993998 * Returns: 0 on success, negative error code on failure.
40003999 *
4001- * Mark the PCI region associated with PCI device @pdev BAR @bar as
4002- * being reserved by owner @res_name. Do not access any
4003- * address inside the PCI regions unless this call returns
4004- * successfully.
4000+ * Mark the PCI region associated with PCI device @pdev BAR @bar as being
4001+ * reserved by owner @name. Do not access any address inside the PCI regions
4002+ * unless this call returns successfully.
40054003 *
40064004 * Returns 0 on success, or %EBUSY on error. A warning
40074005 * message is also printed on failure.
@@ -4011,9 +4009,9 @@ static int __pci_request_region(struct pci_dev *pdev, int bar,
40114009 * when pcim_enable_device() has been called in advance. This hybrid feature is
40124010 * DEPRECATED! If you want managed cleanup, use the pcim_* functions instead.
40134011 */
4014- int pci_request_region (struct pci_dev * pdev , int bar , const char * res_name )
4012+ int pci_request_region (struct pci_dev * pdev , int bar , const char * name )
40154013{
4016- return __pci_request_region (pdev , bar , res_name , 0 );
4014+ return __pci_request_region (pdev , bar , name , 0 );
40174015}
40184016EXPORT_SYMBOL (pci_request_region );
40194017
@@ -4036,13 +4034,13 @@ void pci_release_selected_regions(struct pci_dev *pdev, int bars)
40364034EXPORT_SYMBOL (pci_release_selected_regions );
40374035
40384036static int __pci_request_selected_regions (struct pci_dev * pdev , int bars ,
4039- const char * res_name , int excl )
4037+ const char * name , int excl )
40404038{
40414039 int i ;
40424040
40434041 for (i = 0 ; i < PCI_STD_NUM_BARS ; i ++ )
40444042 if (bars & (1 << i ))
4045- if (__pci_request_region (pdev , i , res_name , excl ))
4043+ if (__pci_request_region (pdev , i , name , excl ))
40464044 goto err_out ;
40474045 return 0 ;
40484046
@@ -4059,7 +4057,7 @@ static int __pci_request_selected_regions(struct pci_dev *pdev, int bars,
40594057 * pci_request_selected_regions - Reserve selected PCI I/O and memory resources
40604058 * @pdev: PCI device whose resources are to be reserved
40614059 * @bars: Bitmask of BARs to be requested
4062- * @res_name : Name to be associated with resource
4060+ * @name : Name of the driver requesting the resources
40634061 *
40644062 * Returns: 0 on success, negative error code on failure.
40654063 *
@@ -4069,17 +4067,17 @@ static int __pci_request_selected_regions(struct pci_dev *pdev, int bars,
40694067 * DEPRECATED! If you want managed cleanup, use the pcim_* functions instead.
40704068 */
40714069int pci_request_selected_regions (struct pci_dev * pdev , int bars ,
4072- const char * res_name )
4070+ const char * name )
40734071{
4074- return __pci_request_selected_regions (pdev , bars , res_name , 0 );
4072+ return __pci_request_selected_regions (pdev , bars , name , 0 );
40754073}
40764074EXPORT_SYMBOL (pci_request_selected_regions );
40774075
40784076/**
40794077 * pci_request_selected_regions_exclusive - Request regions exclusively
40804078 * @pdev: PCI device to request regions from
40814079 * @bars: bit mask of BARs to request
4082- * @res_name : name to be associated with the requests
4080+ * @name : name of the driver requesting the resources
40834081 *
40844082 * Returns: 0 on success, negative error code on failure.
40854083 *
@@ -4089,9 +4087,9 @@ EXPORT_SYMBOL(pci_request_selected_regions);
40894087 * DEPRECATED! If you want managed cleanup, use the pcim_* functions instead.
40904088 */
40914089int pci_request_selected_regions_exclusive (struct pci_dev * pdev , int bars ,
4092- const char * res_name )
4090+ const char * name )
40934091{
4094- return __pci_request_selected_regions (pdev , bars , res_name ,
4092+ return __pci_request_selected_regions (pdev , bars , name ,
40954093 IORESOURCE_EXCLUSIVE );
40964094}
40974095EXPORT_SYMBOL (pci_request_selected_regions_exclusive );
@@ -4114,12 +4112,11 @@ EXPORT_SYMBOL(pci_release_regions);
41144112/**
41154113 * pci_request_regions - Reserve PCI I/O and memory resources
41164114 * @pdev: PCI device whose resources are to be reserved
4117- * @res_name: Name to be associated with resource.
4115+ * @name: name of the driver requesting the resources
41184116 *
4119- * Mark all PCI regions associated with PCI device @pdev as
4120- * being reserved by owner @res_name. Do not access any
4121- * address inside the PCI regions unless this call returns
4122- * successfully.
4117+ * Mark all PCI regions associated with PCI device @pdev as being reserved by
4118+ * owner @name. Do not access any address inside the PCI regions unless this
4119+ * call returns successfully.
41234120 *
41244121 * Returns 0 on success, or %EBUSY on error. A warning
41254122 * message is also printed on failure.
@@ -4129,22 +4126,22 @@ EXPORT_SYMBOL(pci_release_regions);
41294126 * when pcim_enable_device() has been called in advance. This hybrid feature is
41304127 * DEPRECATED! If you want managed cleanup, use the pcim_* functions instead.
41314128 */
4132- int pci_request_regions (struct pci_dev * pdev , const char * res_name )
4129+ int pci_request_regions (struct pci_dev * pdev , const char * name )
41334130{
41344131 return pci_request_selected_regions (pdev ,
4135- ((1 << PCI_STD_NUM_BARS ) - 1 ), res_name );
4132+ ((1 << PCI_STD_NUM_BARS ) - 1 ), name );
41364133}
41374134EXPORT_SYMBOL (pci_request_regions );
41384135
41394136/**
41404137 * pci_request_regions_exclusive - Reserve PCI I/O and memory resources
41414138 * @pdev: PCI device whose resources are to be reserved
4142- * @res_name: Name to be associated with resource.
4139+ * @name: name of the driver requesting the resources
41434140 *
41444141 * Returns: 0 on success, negative error code on failure.
41454142 *
41464143 * Mark all PCI regions associated with PCI device @pdev as being reserved
4147- * by owner @res_name. Do not access any address inside the PCI regions
4144+ * by owner @name. Do not access any address inside the PCI regions
41484145 * unless this call returns successfully.
41494146 *
41504147 * pci_request_regions_exclusive() will mark the region so that /dev/mem
@@ -4158,10 +4155,10 @@ EXPORT_SYMBOL(pci_request_regions);
41584155 * when pcim_enable_device() has been called in advance. This hybrid feature is
41594156 * DEPRECATED! If you want managed cleanup, use the pcim_* functions instead.
41604157 */
4161- int pci_request_regions_exclusive (struct pci_dev * pdev , const char * res_name )
4158+ int pci_request_regions_exclusive (struct pci_dev * pdev , const char * name )
41624159{
41634160 return pci_request_selected_regions_exclusive (pdev ,
4164- ((1 << PCI_STD_NUM_BARS ) - 1 ), res_name );
4161+ ((1 << PCI_STD_NUM_BARS ) - 1 ), name );
41654162}
41664163EXPORT_SYMBOL (pci_request_regions_exclusive );
41674164
0 commit comments