Commit 34490a0a authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab
Browse files

[media] staging: as102: Eliminate as10x_handle_t alias



Remove pre-processor defined as10x_handle_t data type by directly
replacing it with struct as102_bus_adapter_t. phandle is renamed
to adap inside function bodies.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: default avatarSylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent d758b9ef
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);

static void as102_stop_stream(struct as102_dev_t *dev)
{
	struct as102_bus_adapter_t *bus_adap;
	struct as10x_bus_adapter_t *bus_adap;

	if (dev != NULL)
		bus_adap = &dev->bus_adap;
@@ -83,7 +83,7 @@ static void as102_stop_stream(struct as102_dev_t *dev)

static int as102_start_stream(struct as102_dev_t *dev)
{
	struct as102_bus_adapter_t *bus_adap;
	struct as10x_bus_adapter_t *bus_adap;
	int ret = -EFAULT;

	if (dev != NULL)
@@ -109,7 +109,7 @@ static int as102_start_stream(struct as102_dev_t *dev)
static int as10x_pid_filter(struct as102_dev_t *dev,
			    int index, u16 pid, int onoff) {

	struct as102_bus_adapter_t *bus_adap = &dev->bus_adap;
	struct as10x_bus_adapter_t *bus_adap = &dev->bus_adap;
	int ret = -EFAULT;

	ENTER();
+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ extern int elna_enable;
#define AS102_USB_BUF_SIZE	512
#define MAX_STREAM_URB		32

struct as102_bus_adapter_t {
struct as10x_bus_adapter_t {
	struct usb_device *usb_dev;
	/* bus token lock */
	struct mutex lock;
@@ -72,7 +72,7 @@ struct as102_bus_adapter_t {

struct as102_dev_t {
	const char *name;
	struct as102_bus_adapter_t bus_adap;
	struct as10x_bus_adapter_t bus_adap;
	struct list_head device_entry;
	struct kref kref;
	unsigned long minor;
+2 −2
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ static int parse_hex_line(unsigned char *fw_data, unsigned char *addr,
	return (count * 2) + 2;
}

static int as102_firmware_upload(struct as102_bus_adapter_t *bus_adap,
static int as102_firmware_upload(struct as10x_bus_adapter_t *bus_adap,
				 unsigned char *cmd,
				 const struct firmware *firmware) {

@@ -162,7 +162,7 @@ static int as102_firmware_upload(struct as102_bus_adapter_t *bus_adap,
	return (errno == 0) ? total_read_bytes : errno;
}

int as102_fw_upload(struct as102_bus_adapter_t *bus_adap)
int as102_fw_upload(struct as10x_bus_adapter_t *bus_adap)
{
	int errno = -EFAULT;
	const struct firmware *firmware;
+1 −1
Original line number Diff line number Diff line
@@ -34,5 +34,5 @@ struct as10x_fw_pkt_t {
} __packed;

#ifdef __KERNEL__
int as102_fw_upload(struct as102_bus_adapter_t *bus_adap);
int as102_fw_upload(struct as10x_bus_adapter_t *bus_adap);
#endif
+3 −3
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static struct usb_class_driver as102_usb_class_driver = {
	.minor_base	= AS102_DEVICE_MAJOR,
};

static int as102_usb_xfer_cmd(struct as102_bus_adapter_t *bus_adap,
static int as102_usb_xfer_cmd(struct as10x_bus_adapter_t *bus_adap,
			      unsigned char *send_buf, int send_buf_len,
			      unsigned char *recv_buf, int recv_buf_len)
{
@@ -131,7 +131,7 @@ static int as102_usb_xfer_cmd(struct as102_bus_adapter_t *bus_adap,
	return ret;
}

static int as102_send_ep1(struct as102_bus_adapter_t *bus_adap,
static int as102_send_ep1(struct as10x_bus_adapter_t *bus_adap,
			  unsigned char *send_buf,
			  int send_buf_len,
			  int swap32)
@@ -154,7 +154,7 @@ static int as102_send_ep1(struct as102_bus_adapter_t *bus_adap,
	return ret ? ret : actual_len;
}

static int as102_read_ep2(struct as102_bus_adapter_t *bus_adap,
static int as102_read_ep2(struct as10x_bus_adapter_t *bus_adap,
		   unsigned char *recv_buf, int recv_buf_len)
{
	int ret = 0, actual_len;
Loading