Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging tree fixes from Greg Kroah-Hartman:
"Here are a few staging tree fixes for problems that have been
reported.

Nothing major, just a number of tiny driver fixes. All of these have
been in the linux-next tree for a while.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'staging-3.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
drm/omap: add more new timings fields
drm/omap: update for interlaced
staging: r8712u: fix bug in r8712_recv_indicatepkt()
staging: zcache: fix cleancache race condition with shrinker
Staging: Android alarm: IOCTL command encoding fix
staging: vt6656: [BUG] - Failed connection, incorrect endian.
staging: ozwpan: fix memcmp() test in oz_set_active_pd()
staging: wlan-ng: Fix problem with wrong arguments
staging: comedi: das08: Correct AO output for das08jr-16-ao
staging: comedi: das08: Correct AI encoding for das08jr-16-ao
staging: comedi: das08: Fix PCI ref count
staging: comedi: amplc_pci230: Fix PCI ref count
staging: comedi: amplc_pc263: Fix PCI ref count
staging: comedi: amplc_pc236: Fix PCI ref count
staging: comedi: amplc_dio200: Fix PCI ref count
staging: comedi: amplc_pci224: Fix PCI ref count
drivers/iio/adc/at91_adc.c: adjust inconsistent IS_ERR and PTR_ERR
staging iio: fix potential memory leak in lis3l02dq_ring.c
staging:iio: prevent divide by zero bugs

+123 -47
+1 -1
drivers/iio/adc/at91_adc.c
··· 617 617 st->adc_clk = clk_get(&pdev->dev, "adc_op_clk"); 618 618 if (IS_ERR(st->adc_clk)) { 619 619 dev_err(&pdev->dev, "Failed to get the ADC clock.\n"); 620 - ret = PTR_ERR(st->clk); 620 + ret = PTR_ERR(st->adc_clk); 621 621 goto error_disable_clk; 622 622 } 623 623
+3 -1
drivers/staging/android/android_alarm.h
··· 51 51 #define ANDROID_ALARM_WAIT _IO('a', 1) 52 52 53 53 #define ALARM_IOW(c, type, size) _IOW('a', (c) | ((type) << 4), size) 54 + #define ALARM_IOR(c, type, size) _IOR('a', (c) | ((type) << 4), size) 55 + 54 56 /* Set alarm */ 55 57 #define ANDROID_ALARM_SET(type) ALARM_IOW(2, type, struct timespec) 56 58 #define ANDROID_ALARM_SET_AND_WAIT(type) ALARM_IOW(3, type, struct timespec) 57 - #define ANDROID_ALARM_GET_TIME(type) ALARM_IOW(4, type, struct timespec) 59 + #define ANDROID_ALARM_GET_TIME(type) ALARM_IOR(4, type, struct timespec) 58 60 #define ANDROID_ALARM_SET_RTC _IOW('a', 5, struct timespec) 59 61 #define ANDROID_ALARM_BASE_CMD(cmd) (cmd & ~(_IOC(0, 0, 0xf0, 0))) 60 62 #define ANDROID_ALARM_IOCTL_TO_TYPE(cmd) (_IOC_NR(cmd) >> 4)
+7
drivers/staging/comedi/drivers/amplc_dio200.c
··· 1412 1412 dev_err(dev->class_dev, "BUG! cannot determine board type!\n"); 1413 1413 return -EINVAL; 1414 1414 } 1415 + /* 1416 + * Need to 'get' the PCI device to match the 'put' in dio200_detach(). 1417 + * TODO: Remove the pci_dev_get() and matching pci_dev_put() once 1418 + * support for manual attachment of PCI devices via dio200_attach() 1419 + * has been removed. 1420 + */ 1421 + pci_dev_get(pci_dev); 1415 1422 return dio200_pci_common_attach(dev, pci_dev); 1416 1423 } 1417 1424
+7
drivers/staging/comedi/drivers/amplc_pc236.c
··· 565 565 dev_err(dev->class_dev, "BUG! cannot determine board type!\n"); 566 566 return -EINVAL; 567 567 } 568 + /* 569 + * Need to 'get' the PCI device to match the 'put' in pc236_detach(). 570 + * TODO: Remove the pci_dev_get() and matching pci_dev_put() once 571 + * support for manual attachment of PCI devices via pc236_attach() 572 + * has been removed. 573 + */ 574 + pci_dev_get(pci_dev); 568 575 return pc236_pci_common_attach(dev, pci_dev); 569 576 } 570 577
+7
drivers/staging/comedi/drivers/amplc_pc263.c
··· 298 298 dev_err(dev->class_dev, "BUG! cannot determine board type!\n"); 299 299 return -EINVAL; 300 300 } 301 + /* 302 + * Need to 'get' the PCI device to match the 'put' in pc263_detach(). 303 + * TODO: Remove the pci_dev_get() and matching pci_dev_put() once 304 + * support for manual attachment of PCI devices via pc263_attach() 305 + * has been removed. 306 + */ 307 + pci_dev_get(pci_dev); 301 308 return pc263_pci_common_attach(dev, pci_dev); 302 309 } 303 310
+7
drivers/staging/comedi/drivers/amplc_pci224.c
··· 1503 1503 DRIVER_NAME ": BUG! cannot determine board type!\n"); 1504 1504 return -EINVAL; 1505 1505 } 1506 + /* 1507 + * Need to 'get' the PCI device to match the 'put' in pci224_detach(). 1508 + * TODO: Remove the pci_dev_get() and matching pci_dev_put() once 1509 + * support for manual attachment of PCI devices via pci224_attach() 1510 + * has been removed. 1511 + */ 1512 + pci_dev_get(pci_dev); 1506 1513 return pci224_attach_common(dev, pci_dev, NULL); 1507 1514 } 1508 1515
+7
drivers/staging/comedi/drivers/amplc_pci230.c
··· 2925 2925 "amplc_pci230: BUG! cannot determine board type!\n"); 2926 2926 return -EINVAL; 2927 2927 } 2928 + /* 2929 + * Need to 'get' the PCI device to match the 'put' in pci230_detach(). 2930 + * TODO: Remove the pci_dev_get() and matching pci_dev_put() once 2931 + * support for manual attachment of PCI devices via pci230_attach() 2932 + * has been removed. 2933 + */ 2934 + pci_dev_get(pci_dev); 2928 2935 return pci230_attach_common(dev, pci_dev); 2929 2936 } 2930 2937
+9 -2
drivers/staging/comedi/drivers/das08.c
··· 378 378 int chan; 379 379 380 380 lsb = data[0] & 0xff; 381 - msb = (data[0] >> 8) & 0xf; 381 + msb = (data[0] >> 8) & 0xff; 382 382 383 383 chan = CR_CHAN(insn->chanspec); 384 384 ··· 623 623 .ai = das08_ai_rinsn, 624 624 .ai_nbits = 16, 625 625 .ai_pg = das08_pg_none, 626 - .ai_encoding = das08_encode12, 626 + .ai_encoding = das08_encode16, 627 627 .ao = das08jr_ao_winsn, 628 628 .ao_nbits = 16, 629 629 .di = das08jr_di_rbits, ··· 922 922 dev_err(dev->class_dev, "BUG! cannot determine board type!\n"); 923 923 return -EINVAL; 924 924 } 925 + /* 926 + * Need to 'get' the PCI device to match the 'put' in das08_detach(). 927 + * TODO: Remove the pci_dev_get() and matching pci_dev_put() once 928 + * support for manual attachment of PCI devices via das08_attach() 929 + * has been removed. 930 + */ 931 + pci_dev_get(pdev); 925 932 return das08_pci_attach_common(dev, pdev); 926 933 } 927 934
+3 -1
drivers/staging/iio/accel/lis3l02dq_ring.c
··· 121 121 if (rx_array == NULL) 122 122 return -ENOMEM; 123 123 ret = lis3l02dq_read_all(indio_dev, rx_array); 124 - if (ret < 0) 124 + if (ret < 0) { 125 + kfree(rx_array); 125 126 return ret; 127 + } 126 128 for (i = 0; i < scan_count; i++) 127 129 data[i] = combine_8_to_16(rx_array[i*4+1], 128 130 rx_array[i*4+3]);
+2
drivers/staging/iio/adc/ad7192.c
··· 647 647 ret = strict_strtoul(buf, 10, &lval); 648 648 if (ret) 649 649 return ret; 650 + if (lval == 0) 651 + return -EINVAL; 650 652 651 653 mutex_lock(&indio_dev->mlock); 652 654 if (iio_buffer_enabled(indio_dev)) {
+2
drivers/staging/iio/gyro/adis16260_core.c
··· 195 195 ret = strict_strtol(buf, 10, &val); 196 196 if (ret) 197 197 return ret; 198 + if (val == 0) 199 + return -EINVAL; 198 200 199 201 mutex_lock(&indio_dev->mlock); 200 202 if (spi_get_device_id(st->us)) {
+2
drivers/staging/iio/imu/adis16400_core.c
··· 234 234 ret = strict_strtol(buf, 10, &val); 235 235 if (ret) 236 236 return ret; 237 + if (val == 0) 238 + return -EINVAL; 237 239 238 240 mutex_lock(&indio_dev->mlock); 239 241
+2
drivers/staging/iio/meter/ade7753.c
··· 425 425 ret = strict_strtol(buf, 10, &val); 426 426 if (ret) 427 427 return ret; 428 + if (val == 0) 429 + return -EINVAL; 428 430 429 431 mutex_lock(&indio_dev->mlock); 430 432
+2
drivers/staging/iio/meter/ade7754.c
··· 445 445 ret = strict_strtol(buf, 10, &val); 446 446 if (ret) 447 447 return ret; 448 + if (val == 0) 449 + return -EINVAL; 448 450 449 451 mutex_lock(&indio_dev->mlock); 450 452
+2
drivers/staging/iio/meter/ade7759.c
··· 385 385 ret = strict_strtol(buf, 10, &val); 386 386 if (ret) 387 387 return ret; 388 + if (val == 0) 389 + return -EINVAL; 388 390 389 391 mutex_lock(&indio_dev->mlock); 390 392
+32 -9
drivers/staging/omapdrm/omap_connector.c
··· 48 48 mode->vsync_end = mode->vsync_start + timings->vsw; 49 49 mode->vtotal = mode->vsync_end + timings->vbp; 50 50 51 - /* note: whether or not it is interlaced, +/- h/vsync, etc, 52 - * which should be set in the mode flags, is not exposed in 53 - * the omap_video_timings struct.. but hdmi driver tracks 54 - * those separately so all we have to have to set the mode 55 - * is the way to recover these timings values, and the 56 - * omap_dss_driver would do the rest. 57 - */ 51 + mode->flags = 0; 52 + 53 + if (timings->interlace) 54 + mode->flags |= DRM_MODE_FLAG_INTERLACE; 55 + 56 + if (timings->hsync_level == OMAPDSS_SIG_ACTIVE_HIGH) 57 + mode->flags |= DRM_MODE_FLAG_PHSYNC; 58 + else 59 + mode->flags |= DRM_MODE_FLAG_NHSYNC; 60 + 61 + if (timings->vsync_level == OMAPDSS_SIG_ACTIVE_HIGH) 62 + mode->flags |= DRM_MODE_FLAG_PVSYNC; 63 + else 64 + mode->flags |= DRM_MODE_FLAG_NVSYNC; 58 65 } 59 66 60 67 static inline void copy_timings_drm_to_omap(struct omap_video_timings *timings, ··· 78 71 timings->vfp = mode->vsync_start - mode->vdisplay; 79 72 timings->vsw = mode->vsync_end - mode->vsync_start; 80 73 timings->vbp = mode->vtotal - mode->vsync_end; 74 + 75 + timings->interlace = !!(mode->flags & DRM_MODE_FLAG_INTERLACE); 76 + 77 + if (mode->flags & DRM_MODE_FLAG_PHSYNC) 78 + timings->hsync_level = OMAPDSS_SIG_ACTIVE_HIGH; 79 + else 80 + timings->hsync_level = OMAPDSS_SIG_ACTIVE_LOW; 81 + 82 + if (mode->flags & DRM_MODE_FLAG_PVSYNC) 83 + timings->vsync_level = OMAPDSS_SIG_ACTIVE_HIGH; 84 + else 85 + timings->vsync_level = OMAPDSS_SIG_ACTIVE_LOW; 86 + 87 + timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; 88 + timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH; 89 + timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES; 81 90 } 82 91 83 92 static void omap_connector_dpms(struct drm_connector *connector, int mode) ··· 210 187 } 211 188 } else { 212 189 struct drm_display_mode *mode = drm_mode_create(dev); 213 - struct omap_video_timings timings; 190 + struct omap_video_timings timings = {0}; 214 191 215 192 dssdrv->get_timings(dssdev, &timings); 216 193 ··· 314 291 struct omap_connector *omap_connector = to_omap_connector(connector); 315 292 struct omap_dss_device *dssdev = omap_connector->dssdev; 316 293 struct omap_dss_driver *dssdrv = dssdev->driver; 317 - struct omap_video_timings timings; 294 + struct omap_video_timings timings = {0}; 318 295 319 296 copy_timings_drm_to_omap(&timings, mode); 320 297
+2 -1
drivers/staging/ozwpan/ozcdev.c
··· 8 8 #include <linux/cdev.h> 9 9 #include <linux/uaccess.h> 10 10 #include <linux/netdevice.h> 11 + #include <linux/etherdevice.h> 11 12 #include <linux/poll.h> 12 13 #include <linux/sched.h> 13 14 #include "ozconfig.h" ··· 214 213 if (old_pd) 215 214 oz_pd_put(old_pd); 216 215 } else { 217 - if (!memcmp(addr, "\0\0\0\0\0\0", sizeof(addr))) { 216 + if (is_zero_ether_addr(addr)) { 218 217 spin_lock_bh(&g_cdev.lock); 219 218 pd = g_cdev.active_pd; 220 219 g_cdev.active_pd = 0;
+1 -6
drivers/staging/rtl8712/recv_linux.c
··· 117 117 if (skb == NULL) 118 118 goto _recv_indicatepkt_drop; 119 119 skb->data = precv_frame->u.hdr.rx_data; 120 - #ifdef NET_SKBUFF_DATA_USES_OFFSET 121 - skb->tail = (sk_buff_data_t)(precv_frame->u.hdr.rx_tail - 122 - precv_frame->u.hdr.rx_head); 123 - #else 124 - skb->tail = (sk_buff_data_t)precv_frame->u.hdr.rx_tail; 125 - #endif 126 120 skb->len = precv_frame->u.hdr.len; 121 + skb_set_tail_pointer(skb, skb->len); 127 122 if ((pattrib->tcpchk_valid == 1) && (pattrib->tcp_chkrpt == 1)) 128 123 skb->ip_summed = CHECKSUM_UNNECESSARY; 129 124 else
+1 -1
drivers/staging/vt6656/dpc.c
··· 200 200 } else if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_RFC1042[0])) { 201 201 cbHeaderSize += 6; 202 202 pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize); 203 - if ((*pwType == cpu_to_le16(ETH_P_IPX)) || 203 + if ((*pwType == cpu_to_be16(ETH_P_IPX)) || 204 204 (*pwType == cpu_to_le16(0xF380))) { 205 205 cbHeaderSize -= 8; 206 206 pwType = (PWORD) (pbyRxBufferAddr + cbHeaderSize);
+19 -19
drivers/staging/vt6656/rxtx.c
··· 1699 1699 // 802.1H 1700 1700 if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) { 1701 1701 if (pDevice->dwDiagRefCount == 0) { 1702 - if ((psEthHeader->wType == cpu_to_le16(ETH_P_IPX)) || 1702 + if ((psEthHeader->wType == cpu_to_be16(ETH_P_IPX)) || 1703 1703 (psEthHeader->wType == cpu_to_le16(0xF380))) { 1704 1704 memcpy((PBYTE) (pbyPayloadHead), 1705 1705 abySNAP_Bridgetunnel, 6); ··· 2838 2838 Packet_Type = skb->data[ETH_HLEN+1]; 2839 2839 Descriptor_type = skb->data[ETH_HLEN+1+1+2]; 2840 2840 Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]); 2841 - if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) { 2842 - /* 802.1x OR eapol-key challenge frame transfer */ 2843 - if (((Protocol_Version == 1) || (Protocol_Version == 2)) && 2844 - (Packet_Type == 3)) { 2841 + if (pDevice->sTxEthHeader.wType == cpu_to_be16(ETH_P_PAE)) { 2842 + /* 802.1x OR eapol-key challenge frame transfer */ 2843 + if (((Protocol_Version == 1) || (Protocol_Version == 2)) && 2844 + (Packet_Type == 3)) { 2845 2845 bTxeapol_key = TRUE; 2846 2846 if(!(Key_info & BIT3) && //WPA or RSN group-key challenge 2847 2847 (Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key ··· 2987 2987 } 2988 2988 } 2989 2989 2990 - if (pDevice->sTxEthHeader.wType == cpu_to_le16(ETH_P_PAE)) { 2991 - if (pDevice->byBBType != BB_TYPE_11A) { 2992 - pDevice->wCurrentRate = RATE_1M; 2993 - pDevice->byACKRate = RATE_1M; 2994 - pDevice->byTopCCKBasicRate = RATE_1M; 2995 - pDevice->byTopOFDMBasicRate = RATE_6M; 2996 - } else { 2997 - pDevice->wCurrentRate = RATE_6M; 2998 - pDevice->byACKRate = RATE_6M; 2999 - pDevice->byTopCCKBasicRate = RATE_1M; 3000 - pDevice->byTopOFDMBasicRate = RATE_6M; 3001 - } 3002 - } 2990 + if (pDevice->sTxEthHeader.wType == cpu_to_be16(ETH_P_PAE)) { 2991 + if (pDevice->byBBType != BB_TYPE_11A) { 2992 + pDevice->wCurrentRate = RATE_1M; 2993 + pDevice->byACKRate = RATE_1M; 2994 + pDevice->byTopCCKBasicRate = RATE_1M; 2995 + pDevice->byTopOFDMBasicRate = RATE_6M; 2996 + } else { 2997 + pDevice->wCurrentRate = RATE_6M; 2998 + pDevice->byACKRate = RATE_6M; 2999 + pDevice->byTopCCKBasicRate = RATE_1M; 3000 + pDevice->byTopOFDMBasicRate = RATE_6M; 3001 + } 3002 + } 3003 3003 3004 3004 DBG_PRT(MSG_LEVEL_DEBUG, 3005 3005 KERN_INFO "dma_tx: pDevice->wCurrentRate = %d\n", ··· 3015 3015 3016 3016 if (bNeedEncryption == TRUE) { 3017 3017 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType)); 3018 - if ((pDevice->sTxEthHeader.wType) == cpu_to_le16(ETH_P_PAE)) { 3018 + if ((pDevice->sTxEthHeader.wType) == cpu_to_be16(ETH_P_PAE)) { 3019 3019 bNeedEncryption = FALSE; 3020 3020 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType)); 3021 3021 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
+2 -2
drivers/staging/wlan-ng/cfg80211.c
··· 327 327 return result; 328 328 } 329 329 330 - int prism2_scan(struct wiphy *wiphy, struct net_device *dev, 331 - struct cfg80211_scan_request *request) 330 + int prism2_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) 332 331 { 332 + struct net_device *dev = request->wdev->netdev; 333 333 struct prism2_wiphy_private *priv = wiphy_priv(wiphy); 334 334 wlandevice_t *wlandev = dev->ml_priv; 335 335 struct p80211msg_dot11req_scan msg1;
+3 -4
drivers/staging/zcache/zcache-main.c
··· 1251 1251 void *pampd, struct tmem_pool *pool, 1252 1252 struct tmem_oid *oid, uint32_t index) 1253 1253 { 1254 - int ret = 0; 1255 - 1256 1254 BUG_ON(!is_ephemeral(pool)); 1257 - zbud_decompress((struct page *)(data), pampd); 1255 + if (zbud_decompress((struct page *)(data), pampd) < 0) 1256 + return -EINVAL; 1258 1257 zbud_free_and_delist((struct zbud_hdr *)pampd); 1259 1258 atomic_dec(&zcache_curr_eph_pampd_count); 1260 - return ret; 1259 + return 0; 1261 1260 } 1262 1261 1263 1262 /*