From patchwork Wed Sep 2 11:01:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11750319 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6F641575 for ; Wed, 2 Sep 2020 11:03:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4A842098B for ; Wed, 2 Sep 2020 11:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599044607; bh=tPRhJJgXvDc0IuVKlXjbFRDWA8BX95/8fwQ++InXL5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VwbGvYP/QfBoxN3wi+CY7HlrOxUEi580RwSeeRmUZ60wbFp2YwoSxHaTByHEAvYD4 Mcq1fNt+xC63WxPW9dk2Haztp7m/vU5I1NxoTa+h5NyKgqrxFUYF35egQfHLETTwA8 v9XvVGNXF6fcoH0E9uMwVVVjManul7ZfnfHxJ1w0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726994AbgIBLCi (ORCPT ); Wed, 2 Sep 2020 07:02:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:45956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbgIBLBa (ORCPT ); Wed, 2 Sep 2020 07:01:30 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DB99E2166E; Wed, 2 Sep 2020 11:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599044489; bh=tPRhJJgXvDc0IuVKlXjbFRDWA8BX95/8fwQ++InXL5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=07OoVR0jEQGE5aJ5jGecu1PUSSxjmfVizWumbkwRmppmTzi/9M+GYZ6sLUlp/8xsA MatkLBEBframZqC4xWnXZgXV2Gexp07mxPQDdNbBrtzD/tJyKLiaWzNS5FIbLeFx4n BewIUXy+pc/RvMtGbdmQB3kbyYdWeaqMLVXio7Bs= From: Greg Kroah-Hartman To: himadrispandya@gmail.com, dvyukov@google.com, linux-usb@vger.kernel.org Cc: perex@perex.cz, tiwai@suse.com, stern@rowland.harvard.ed, linux-kernel@vger.kernel.org, marcel@holtmann.org, johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org, alsa-devel@alsa-project.org, Greg Kroah-Hartman Subject: [PATCH 8/9] sound: 6fire: move to use new usb control functions... Date: Wed, 2 Sep 2020 13:01:11 +0200 Message-Id: <20200902110115.1994491-10-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200902110115.1994491-1-gregkh@linuxfoundation.org> References: <20200902110115.1994491-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- sound/usb/6fire/firmware.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c index 69137c14d0dc..e87bfa97be4e 100644 --- a/sound/usb/6fire/firmware.c +++ b/sound/usb/6fire/firmware.c @@ -158,29 +158,17 @@ static int usb6fire_fw_ihex_init(const struct firmware *fw, static int usb6fire_fw_ezusb_write(struct usb_device *device, int type, int value, char *data, int len) { - int ret; - - ret = usb_control_msg(device, usb_sndctrlpipe(device, 0), type, + return usb_control_msg_send(device, 0, type, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, 0, data, len, HZ); - if (ret < 0) - return ret; - else if (ret != len) - return -EIO; - return 0; } static int usb6fire_fw_ezusb_read(struct usb_device *device, int type, int value, char *data, int len) { - int ret = usb_control_msg(device, usb_rcvctrlpipe(device, 0), type, + return usb_control_msg_recv(device, 0, type, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, 0, data, len, HZ); - if (ret < 0) - return ret; - else if (ret != len) - return -EIO; - return 0; } static int usb6fire_fw_fpga_write(struct usb_device *device,