Remove unnecessary changes; trim down logging
This commit is contained in:
parent
bcf597143a
commit
d84b2b187c
@ -38,11 +38,12 @@
|
||||
// Keep Eclipse happy
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#undef dev_vdbg
|
||||
#undef dev_dbg
|
||||
#define dev_vdbg(d, args...) printk(args)
|
||||
#define dev_dbg(d, args...) printk(args)
|
||||
|
||||
#endif
|
||||
|
||||
/* big enough to hold our biggest descriptor */
|
||||
#define USB_BUFSIZ 1024
|
||||
|
@ -80,9 +80,6 @@ static void ModuleExit(void);
|
||||
#include <linux/utsname.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
void myReset(void);
|
||||
static int dUsbInit(void);
|
||||
static void dUsbExit(void);
|
||||
static struct fsg_common *fsg_common;
|
||||
|
||||
#include "computil.c" // The composite framework used as utility file
|
||||
@ -748,8 +745,3 @@ static int msg_bind(struct usb_composite_dev *cdev)
|
||||
static int msg_config(struct usb_configuration *c) {
|
||||
return fsg_add(c->cdev, c, fsg_common);
|
||||
}
|
||||
|
||||
void myReset() {
|
||||
dUsbExit();
|
||||
dUsbInit();
|
||||
}
|
@ -705,6 +705,8 @@ static int do_read(struct fsg_common *common)
|
||||
u32 amount_left;
|
||||
loff_t file_offset, file_offset_tmp;
|
||||
unsigned int amount;
|
||||
// partial_page handling causes hangs
|
||||
// same thing in do_write() --mmoskal
|
||||
//unsigned int partial_page;
|
||||
ssize_t nread;
|
||||
|
||||
@ -2651,19 +2653,6 @@ static ssize_t fsg_store_active(struct device *dev, struct device_attribute *att
|
||||
|
||||
if (sscanf(buf, "%d", &i) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
if (i == 0) {
|
||||
dUsbExit();
|
||||
dUsbInit();
|
||||
}
|
||||
else if (i == 1) {
|
||||
do_set_config(fsg_common, 0);
|
||||
}
|
||||
else if (i == 2) {
|
||||
raise_exception(fsg_common, FSG_STATE_CONFIG_CHANGE);
|
||||
}
|
||||
*/
|
||||
|
||||
if (isActive() != i) {
|
||||
if (i == 0) {
|
||||
|
@ -749,13 +749,11 @@ static ssize_t fsg_store_file(struct device *dev, struct device_attribute *attr,
|
||||
struct fsg_lun *curlun = fsg_lun_from_dev(dev);
|
||||
struct rw_semaphore *filesem = dev_get_drvdata(dev);
|
||||
int rc = 0;
|
||||
|
||||
#if 0
|
||||
|
||||
if (curlun->prevent_medium_removal && fsg_lun_is_open(curlun)) {
|
||||
LDBG(curlun, "eject attempt prevented\n");
|
||||
return -EBUSY; /* "Door is locked" */
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Remove a trailing newline */
|
||||
if (count > 0 && buf[count-1] == '\n')
|
||||
|
@ -734,6 +734,5 @@ int rudolf_add(struct usb_composite_dev *cdev, bool autoresume)
|
||||
rudolf_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
|
||||
}
|
||||
|
||||
|
||||
return usb_add_config(cdev, &rudolf_driver);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user