From 1be773ac0f366758d4c6cb8697d6d9d13c8ba2ff Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Tue, 17 Mar 2020 10:06:10 +0900 Subject: Remove unused usb_client hal feature Change-Id: I45c4e47f73383e6aa3b8fa09455d880d172260a7 (cherry picked from commit ed676213573380022833b918ba7b17ef300df96d) --- hw/usb_client/usb_client.c | 43 ++++++------------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/hw/usb_client/usb_client.c b/hw/usb_client/usb_client.c index 9a90967..4993f28 100644 --- a/hw/usb_client/usb_client.c +++ b/hw/usb_client/usb_client.c @@ -18,32 +18,7 @@ #include -#include -#include -#include - -#define zalloc(amount) calloc(1, amount) - -static int legacy_get_current_gadget(struct usb_client *usb, - struct usb_gadget **_gadget) -{ - return -ENOTSUP; -} - -static bool legacy_is_function_supported(struct usb_client *usb, - struct usb_function *func) -{ - return false; -} - -static bool legacy_is_gadget_supported(struct usb_client *usb, - struct usb_gadget *gadget) -{ - return false; -} - -static int legacy_reconfigure_gadget(struct usb_client *usb, - struct usb_gadget *gadget) +static int legacy_reconfigure_gadget(struct usb_client *usb, struct usb_gadget *gadget) { return 0; } @@ -58,10 +33,6 @@ static int legacy_disable(struct usb_client *usb) return 0; } -static void legacy_free_gadget(struct usb_gadget *gadget) -{ -} - static int legacy_gadget_open(struct hw_info *info, const char *id, struct hw_common **common) { @@ -70,20 +41,18 @@ static int legacy_gadget_open(struct hw_info *info, if (!info || !common) return -EINVAL; - legacy = zalloc(sizeof(*legacy)); + legacy = calloc(1, sizeof(*legacy)); if (!legacy) return -ENOMEM; legacy->common.info = info; - legacy->get_current_gadget = legacy_get_current_gadget; + legacy->reconfigure_gadget = legacy_reconfigure_gadget; - legacy->is_gadget_supported = legacy_is_gadget_supported; - legacy->is_function_supported = legacy_is_function_supported; legacy->enable = legacy_enable; legacy->disable = legacy_disable; - legacy->free_gadget = legacy_free_gadget; *common = &legacy->common; + return 0; } @@ -94,10 +63,10 @@ static int legacy_gadget_close(struct hw_common *common) if (!common) return -EINVAL; - legacy = container_of(common, struct usb_client, - common); + legacy = container_of(common, struct usb_client, common); free(legacy); + return 0; } -- cgit v1.2.3