Skip to content

Commit

Permalink
[media] staging: as102: Eliminate as10x_handle_t alias
Browse files Browse the repository at this point in the history
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: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Nov 8, 2011
1 parent d758b9e commit 34490a0
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 166 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/media/as102/as102_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand All @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/media/as102/as102_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/media/as102/as102_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/media/as102/as102_fw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions drivers/staging/media/as102/as102_usb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 34490a0

Please sign in to comment.