Re: [PATCH 2/7] USB: UHCI: Allow dynamic assignment of bus specific functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/05/11 21:58, Alan Stern wrote:
> On Wed, 4 May 2011, Jan Andersson wrote:
> 
>> This patch is part of a series that extend the UHCI HCD to support
>> non-PCI controllers.
>>
>> This patch changes calls to uhci_reset_hc, uhci_check_and_reset_hc,
>> configure_hc, resume_detect_interrupts_are_broken and
>> global_suspend_mode_is_broken so that they are made through pointers
>> in the uhci hcd struct. This will allow these functions to be replaced
>> with bus/arch specific functions.
> 
> ...
> 
>>  /*
>> + * Make sure the controller is completely inactive, unable to
>> + * generate interrupts or do DMA.
>> + */
>> +void uhci_pci_reset_hc(struct uhci_hcd *uhci)
> 
> This routine should be static.  Ditto in 3/7 where the new routine is 
> moved to a different file.
>

Will fix.

>> +{
>> +	uhci_reset_hc(to_pci_dev(uhci_dev(uhci)), uhci->io_addr);
>> +}
>> +
>> +/*
>>   * Last rites for a defunct/nonfunctional controller
>>   * or one we don't want to use any more.
>>   */
>>  static void uhci_hc_died(struct uhci_hcd *uhci)
>>  {
>>  	uhci_get_current_frame_number(uhci);
>> -	uhci_reset_hc(to_pci_dev(uhci_dev(uhci)), uhci->io_addr);
>> +	if (uhci->reset_hc)
>> +		uhci->reset_hc(uhci);
>>  	finish_reset(uhci);
>>  	uhci->dead = 1;
> 
> I think it's safe to assume that the reset_hc and check_and_reset_hc 
> methods will always be set.  The corresponding tests aren't needed.
>

Will remove.

Thanks,
  Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux