diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/floppy.c | 3 | ||||
-rw-r--r-- | drivers/block/ub.c | 11 |
2 files changed, 6 insertions, 8 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 83d8ed39433d..c2c95e614506 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -4135,10 +4135,9 @@ static int have_no_fdc = -ENODEV; | |||
4135 | static ssize_t floppy_cmos_show(struct device *dev, | 4135 | static ssize_t floppy_cmos_show(struct device *dev, |
4136 | struct device_attribute *attr, char *buf) | 4136 | struct device_attribute *attr, char *buf) |
4137 | { | 4137 | { |
4138 | struct platform_device *p; | 4138 | struct platform_device *p = to_platform_device(dev); |
4139 | int drive; | 4139 | int drive; |
4140 | 4140 | ||
4141 | p = container_of(dev, struct platform_device,dev); | ||
4142 | drive = p->id; | 4141 | drive = p->id; |
4143 | return sprintf(buf, "%X\n", UDP->cmos); | 4142 | return sprintf(buf, "%X\n", UDP->cmos); |
4144 | } | 4143 | } |
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 12fb816db7b0..69b7f8e77596 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -391,7 +391,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum); | |||
391 | */ | 391 | */ |
392 | #ifdef CONFIG_USB_LIBUSUAL | 392 | #ifdef CONFIG_USB_LIBUSUAL |
393 | 393 | ||
394 | #define ub_usb_ids storage_usb_ids | 394 | #define ub_usb_ids usb_storage_usb_ids |
395 | #else | 395 | #else |
396 | 396 | ||
397 | static struct usb_device_id ub_usb_ids[] = { | 397 | static struct usb_device_id ub_usb_ids[] = { |
@@ -2146,10 +2146,9 @@ static int ub_get_pipes(struct ub_dev *sc, struct usb_device *dev, | |||
2146 | ep = &altsetting->endpoint[i].desc; | 2146 | ep = &altsetting->endpoint[i].desc; |
2147 | 2147 | ||
2148 | /* Is it a BULK endpoint? */ | 2148 | /* Is it a BULK endpoint? */ |
2149 | if ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | 2149 | if (usb_endpoint_xfer_bulk(ep)) { |
2150 | == USB_ENDPOINT_XFER_BULK) { | ||
2151 | /* BULK in or out? */ | 2150 | /* BULK in or out? */ |
2152 | if (ep->bEndpointAddress & USB_DIR_IN) { | 2151 | if (usb_endpoint_dir_in(ep)) { |
2153 | if (ep_in == NULL) | 2152 | if (ep_in == NULL) |
2154 | ep_in = ep; | 2153 | ep_in = ep; |
2155 | } else { | 2154 | } else { |
@@ -2168,9 +2167,9 @@ static int ub_get_pipes(struct ub_dev *sc, struct usb_device *dev, | |||
2168 | sc->send_ctrl_pipe = usb_sndctrlpipe(dev, 0); | 2167 | sc->send_ctrl_pipe = usb_sndctrlpipe(dev, 0); |
2169 | sc->recv_ctrl_pipe = usb_rcvctrlpipe(dev, 0); | 2168 | sc->recv_ctrl_pipe = usb_rcvctrlpipe(dev, 0); |
2170 | sc->send_bulk_pipe = usb_sndbulkpipe(dev, | 2169 | sc->send_bulk_pipe = usb_sndbulkpipe(dev, |
2171 | ep_out->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); | 2170 | usb_endpoint_num(ep_out)); |
2172 | sc->recv_bulk_pipe = usb_rcvbulkpipe(dev, | 2171 | sc->recv_bulk_pipe = usb_rcvbulkpipe(dev, |
2173 | ep_in->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK); | 2172 | usb_endpoint_num(ep_in)); |
2174 | 2173 | ||
2175 | return 0; | 2174 | return 0; |
2176 | } | 2175 | } |