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 branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
i2c: Sanity checks on adapter registration
i2c: Mark i2c_adapter.id as deprecated
i2c: Drivers shouldn't include <linux/i2c-id.h>
i2c: Delete unused adapter IDs
i2c: Remove obsolete cleanup for clientdata

+23 -36
+10
Documentation/feature-removal-schedule.txt
··· 554 554 Who: NeilBrown <neilb@suse.de> 555 555 556 556 ---------------------------- 557 + 558 + What: i2c_adapter.id 559 + When: June 2011 560 + Why: This field is deprecated. I2C device drivers shouldn't change their 561 + behavior based on the underlying I2C adapter. Instead, the I2C 562 + adapter driver should instantiate the I2C devices and provide the 563 + needed platform-specific information. 564 + Who: Jean Delvare <khali@linux-fr.org> 565 + 566 + ----------------------------
+12
drivers/i2c/i2c-core.c
··· 848 848 goto out_list; 849 849 } 850 850 851 + /* Sanity checks */ 852 + if (unlikely(adap->name[0] == '\0')) { 853 + pr_err("i2c-core: Attempt to register an adapter with " 854 + "no name!\n"); 855 + return -EINVAL; 856 + } 857 + if (unlikely(!adap->algo)) { 858 + pr_err("i2c-core: Attempt to register adapter '%s' with " 859 + "no algo!\n", adap->name); 860 + return -EINVAL; 861 + } 862 + 851 863 rt_mutex_init(&adap->bus_lock); 852 864 mutex_init(&adap->userspace_clients_lock); 853 865 INIT_LIST_HEAD(&adap->userspace_clients);
-1
drivers/i2c/i2c-mux.c
··· 120 120 snprintf(priv->adap.name, sizeof(priv->adap.name), 121 121 "i2c-%d-mux (chan_id %d)", i2c_adapter_id(parent), chan_id); 122 122 priv->adap.owner = THIS_MODULE; 123 - priv->adap.id = parent->id; 124 123 priv->adap.algo = &priv->algo; 125 124 priv->adap.algo_data = priv; 126 125 priv->adap.dev.parent = &parent->dev;
-1
drivers/media/common/saa7146_i2c.c
··· 391 391 392 392 /*****************************************************************************/ 393 393 /* i2c-adapter helper functions */ 394 - #include <linux/i2c-id.h> 395 394 396 395 /* exported algorithm data */ 397 396 static struct i2c_algorithm saa7146_algo = {
-2
drivers/media/video/imx074.c
··· 451 451 ret = imx074_video_probe(icd, client); 452 452 if (ret < 0) { 453 453 icd->ops = NULL; 454 - i2c_set_clientdata(client, NULL); 455 454 kfree(priv); 456 455 return ret; 457 456 } ··· 467 468 icd->ops = NULL; 468 469 if (icl->free_bus) 469 470 icl->free_bus(icl); 470 - i2c_set_clientdata(client, NULL); 471 471 client->driver = NULL; 472 472 kfree(priv); 473 473
-1
drivers/media/video/ir-kbd-i2c.c
··· 44 44 #include <linux/errno.h> 45 45 #include <linux/slab.h> 46 46 #include <linux/i2c.h> 47 - #include <linux/i2c-id.h> 48 47 #include <linux/workqueue.h> 49 48 50 49 #include <media/ir-core.h>
-2
drivers/media/video/ov6650.c
··· 1174 1174 1175 1175 if (ret) { 1176 1176 icd->ops = NULL; 1177 - i2c_set_clientdata(client, NULL); 1178 1177 kfree(priv); 1179 1178 } 1180 1179 ··· 1184 1185 { 1185 1186 struct ov6650 *priv = to_ov6650(client); 1186 1187 1187 - i2c_set_clientdata(client, NULL); 1188 1188 kfree(priv); 1189 1189 return 0; 1190 1190 }
-1
drivers/misc/apds9802als.c
··· 251 251 252 252 return res; 253 253 als_error1: 254 - i2c_set_clientdata(client, NULL); 255 254 kfree(data); 256 255 return res; 257 256 }
-4
drivers/staging/olpc_dcon/olpc_dcon.c
··· 17 17 #include <linux/console.h> 18 18 #include <linux/i2c.h> 19 19 #include <linux/platform_device.h> 20 - #include <linux/i2c-id.h> 21 20 #include <linux/pci.h> 22 21 #include <linux/pci_ids.h> 23 22 #include <linux/interrupt.h> ··· 732 733 edev: 733 734 platform_device_unregister(dcon_device); 734 735 dcon_device = NULL; 735 - i2c_set_clientdata(client, NULL); 736 736 eirq: 737 737 free_irq(DCON_IRQ, &dcon_driver); 738 738 einit: ··· 754 756 if (dcon_device != NULL) 755 757 platform_device_unregister(dcon_device); 756 758 cancel_work_sync(&dcon_work); 757 - 758 - i2c_set_clientdata(client, NULL); 759 759 760 760 return 0; 761 761 }
-1
drivers/video/riva/rivafb-i2c.c
··· 94 94 95 95 strcpy(chan->adapter.name, name); 96 96 chan->adapter.owner = THIS_MODULE; 97 - chan->adapter.id = I2C_HW_B_RIVA; 98 97 chan->adapter.class = i2c_class; 99 98 chan->adapter.algo_data = &chan->algo; 100 99 chan->adapter.dev.parent = &chan->par->pdev->dev;
-22
include/linux/i2c-id.h
··· 32 32 */ 33 33 34 34 /* --- Bit algorithm adapters */ 35 - #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ 36 - #define I2C_HW_B_RIVA 0x010010 /* Riva based graphics cards */ 37 - #define I2C_HW_B_ZR36067 0x010019 /* Zoran-36057/36067 based boards */ 38 35 #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ 39 - #define I2C_HW_B_EM28XX 0x01001f /* em28xx video capture cards */ 40 - #define I2C_HW_B_CX2341X 0x010020 /* Conexant CX2341X MPEG encoder cards */ 41 - #define I2C_HW_B_CX23885 0x010022 /* conexant 23885 based tv cards (bus1) */ 42 - #define I2C_HW_B_AU0828 0x010023 /* auvitek au0828 usb bridge */ 43 - #define I2C_HW_B_CX231XX 0x010024 /* Conexant CX231XX USB based cards */ 44 - #define I2C_HW_B_HDPVR 0x010025 /* Hauppauge HD PVR */ 45 - 46 - /* --- SGI adapters */ 47 - #define I2C_HW_SGI_VINO 0x160000 48 - 49 - /* --- SMBus only adapters */ 50 - #define I2C_HW_SMBUS_W9968CF 0x04000d 51 - #define I2C_HW_SMBUS_OV511 0x04000e /* OV511(+) USB 1.1 webcam ICs */ 52 - #define I2C_HW_SMBUS_OV518 0x04000f /* OV518(+) USB 1.1 webcam ICs */ 53 - #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ 54 - 55 - /* --- Miscellaneous adapters */ 56 - #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ 57 - #define I2C_HW_SAA7134 0x090000 /* SAA7134 video decoder bus */ 58 36 59 37 #endif /* LINUX_I2C_ID_H */
+1 -1
include/linux/i2c.h
··· 353 353 */ 354 354 struct i2c_adapter { 355 355 struct module *owner; 356 - unsigned int id; 356 + unsigned int id __deprecated; 357 357 unsigned int class; /* classes to allow probing for */ 358 358 const struct i2c_algorithm *algo; /* the algorithm to access the bus */ 359 359 void *algo_data;