diff mbox

[10/29] PCI, USB: remove find_bridge in acpi_bus_type

Message ID 1348561590-28067-11-git-send-email-yinghai@kernel.org
State Changes Requested
Headers show

Commit Message

Yinghai Lu Sept. 25, 2012, 8:26 a.m. UTC
The struct member is not used anymore, remove it.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
---
 drivers/usb/core/usb-acpi.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Tianyu Lan Sept. 25, 2012, 8:35 a.m. UTC | #1
2012/9/25 Yinghai Lu <yinghai@kernel.org>:
> The struct member is not used anymore, remove it.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org
> ---
>  drivers/usb/core/usb-acpi.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
> index 8947b20..a6ea613 100644
> --- a/drivers/usb/core/usb-acpi.c
> +++ b/drivers/usb/core/usb-acpi.c
> @@ -102,7 +102,6 @@ static int usb_acpi_find_device(struct device *dev, acpi_handle *handle)
>
>  static struct acpi_bus_type usb_acpi_bus = {
>         .bus = &usb_bus_type,
> -       .find_bridge = NULL,
>         .find_device = usb_acpi_find_device,
>  };
>
HI Yinghai:
                 This member has been populated in the usb-next tree.

http://git.kernel.org/?p=linux/kernel/git/gregkh/usb.git;a=commit;h=d557542421da643358201664903e67fd01dfca1a
> --
> 1.7.7
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



--
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yinghai Lu Sept. 25, 2012, 4:57 p.m. UTC | #2
On Tue, Sep 25, 2012 at 1:35 AM, Lan Tianyu <lantianyu1986@gmail.com> wrote:
> 2012/9/25 Yinghai Lu <yinghai@kernel.org>:
>> The struct member is not used anymore, remove it.
>>
>> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: linux-usb@vger.kernel.org
>> ---
>>  drivers/usb/core/usb-acpi.c |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
>> index 8947b20..a6ea613 100644
>> --- a/drivers/usb/core/usb-acpi.c
>> +++ b/drivers/usb/core/usb-acpi.c
>> @@ -102,7 +102,6 @@ static int usb_acpi_find_device(struct device *dev, acpi_handle *handle)
>>
>>  static struct acpi_bus_type usb_acpi_bus = {
>>         .bus = &usb_bus_type,
>> -       .find_bridge = NULL,
>>         .find_device = usb_acpi_find_device,
>>  };
>>
> HI Yinghai:
>                  This member has been populated in the usb-next tree.
>
> http://git.kernel.org/?p=linux/kernel/git/gregkh/usb.git;a=commit;h=d557542421da643358201664903e67fd01dfca1a

Thanks for pointing that out.

Looks that following change is not needed in that commit.

@@ -102,7 +139,7 @@ static int usb_acpi_find_device(struct device
*dev, acpi_handle *handle)

 static struct acpi_bus_type usb_acpi_bus = {
        .bus = &usb_bus_type,
-       .find_bridge = NULL,
+       .find_bridge = usb_acpi_find_device,
        .find_device = usb_acpi_find_device,
 };

Can you double check if it will work without that line change?

-Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yinghai Lu Sept. 27, 2012, 8:21 p.m. UTC | #3
On Tue, Sep 25, 2012 at 9:57 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Tue, Sep 25, 2012 at 1:35 AM, Lan Tianyu <lantianyu1986@gmail.com> wrote:
>> 2012/9/25 Yinghai Lu <yinghai@kernel.org>:
>>> The struct member is not used anymore, remove it.
>>>
>>> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>> Cc: linux-usb@vger.kernel.org
>>> ---
>>>  drivers/usb/core/usb-acpi.c |    1 -
>>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
>>> index 8947b20..a6ea613 100644
>>> --- a/drivers/usb/core/usb-acpi.c
>>> +++ b/drivers/usb/core/usb-acpi.c
>>> @@ -102,7 +102,6 @@ static int usb_acpi_find_device(struct device *dev, acpi_handle *handle)
>>>
>>>  static struct acpi_bus_type usb_acpi_bus = {
>>>         .bus = &usb_bus_type,
>>> -       .find_bridge = NULL,
>>>         .find_device = usb_acpi_find_device,
>>>  };
>>>
>> HI Yinghai:
>>                  This member has been populated in the usb-next tree.
>>
>> http://git.kernel.org/?p=linux/kernel/git/gregkh/usb.git;a=commit;h=d557542421da643358201664903e67fd01dfca1a
>
> Thanks for pointing that out.
>
> Looks that following change is not needed in that commit.
>
> @@ -102,7 +139,7 @@ static int usb_acpi_find_device(struct device
> *dev, acpi_handle *handle)
>
>  static struct acpi_bus_type usb_acpi_bus = {
>         .bus = &usb_bus_type,
> -       .find_bridge = NULL,
> +       .find_bridge = usb_acpi_find_device,
>         .find_device = usb_acpi_find_device,
>  };
>

after looking your code closely, that find_bridge is still needed.
that usb_port does not have usb_bus_type.

but mixing find bridge and find device cause confusing.

Please check attached patch that will separate find_bridge out.

-Yinghai
Tianyu Lan Sept. 28, 2012, 5:48 a.m. UTC | #4
2012/9/28 Yinghai Lu <yinghai@kernel.org>:
> On Tue, Sep 25, 2012 at 9:57 AM, Yinghai Lu <yinghai@kernel.org> wrote:
>> On Tue, Sep 25, 2012 at 1:35 AM, Lan Tianyu <lantianyu1986@gmail.com> wrote:
>>> 2012/9/25 Yinghai Lu <yinghai@kernel.org>:
>>>> The struct member is not used anymore, remove it.
>>>>
>>>> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>>> Cc: linux-usb@vger.kernel.org
>>>> ---
>>>>  drivers/usb/core/usb-acpi.c |    1 -
>>>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
>>>> index 8947b20..a6ea613 100644
>>>> --- a/drivers/usb/core/usb-acpi.c
>>>> +++ b/drivers/usb/core/usb-acpi.c
>>>> @@ -102,7 +102,6 @@ static int usb_acpi_find_device(struct device *dev, acpi_handle *handle)
>>>>
>>>>  static struct acpi_bus_type usb_acpi_bus = {
>>>>         .bus = &usb_bus_type,
>>>> -       .find_bridge = NULL,
>>>>         .find_device = usb_acpi_find_device,
>>>>  };
>>>>
>>> HI Yinghai:
>>>                  This member has been populated in the usb-next tree.
>>>
>>> http://git.kernel.org/?p=linux/kernel/git/gregkh/usb.git;a=commit;h=d557542421da643358201664903e67fd01dfca1a
>>
>> Thanks for pointing that out.
>>
>> Looks that following change is not needed in that commit.
>>
>> @@ -102,7 +139,7 @@ static int usb_acpi_find_device(struct device
>> *dev, acpi_handle *handle)
>>
>>  static struct acpi_bus_type usb_acpi_bus = {
>>         .bus = &usb_bus_type,
>> -       .find_bridge = NULL,
>> +       .find_bridge = usb_acpi_find_device,
>>         .find_device = usb_acpi_find_device,
>>  };
>>
>
> after looking your code closely, that find_bridge is still needed.
> that usb_port does not have usb_bus_type.
hi Yinghai:
                   Sorry for late reply. You are right.
>
> but mixing find bridge and find device cause confusing.
>
> Please check attached patch that will separate find_bridge out.
Ok. Find one indention error.

-		return 0;
-	} else if (is_usb_port(dev)) {
-		sscanf(dev_name(dev), "port%d", &port_num);
-		/* Get the struct usb_device point of port's hub */
-		udev = to_usb_device(dev->parent->parent);
+	}
+		usb_acpi_check_port_connect_type(udev, *handle, port_num); <== one more tab.
+
+	return 0;
+}
+
>
> -Yinghai



--
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c
index 8947b20..a6ea613 100644
--- a/drivers/usb/core/usb-acpi.c
+++ b/drivers/usb/core/usb-acpi.c
@@ -102,7 +102,6 @@  static int usb_acpi_find_device(struct device *dev, acpi_handle *handle)
 
 static struct acpi_bus_type usb_acpi_bus = {
 	.bus = &usb_bus_type,
-	.find_bridge = NULL,
 	.find_device = usb_acpi_find_device,
 };