summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/i2c
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-cp2615.c6
-rw-r--r--drivers/i2c/busses/i2c-cpm.c2
-rw-r--r--drivers/i2c/busses/i2c-designware-amdpsp.c2
-rw-r--r--drivers/i2c/busses/i2c-diolan-u2c.c2
-rw-r--r--drivers/i2c/busses/i2c-eg20t.c2
-rw-r--r--drivers/i2c/busses/i2c-fsi.c2
-rw-r--r--drivers/i2c/busses/i2c-highlander.c2
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c2
-rw-r--r--drivers/i2c/busses/i2c-iop3xx.c4
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c2
-rw-r--r--drivers/i2c/busses/i2c-parport.c2
-rw-r--r--drivers/i2c/busses/i2c-piix4.c4
-rw-r--r--drivers/i2c/busses/i2c-pxa-pci.c2
-rw-r--r--drivers/i2c/busses/i2c-scmi.c2
-rw-r--r--drivers/i2c/busses/i2c-sh7760.c2
-rw-r--r--drivers/i2c/busses/i2c-simtec.c2
-rw-r--r--drivers/i2c/busses/i2c-stm32f7.c2
-rw-r--r--drivers/i2c/busses/i2c-taos-evm.c2
-rw-r--r--drivers/i2c/busses/i2c-tiny-usb.c6
-rw-r--r--drivers/i2c/busses/i2c-virtio.c2
-rw-r--r--drivers/i2c/busses/scx200_acb.c2
-rw-r--r--drivers/i2c/i2c-atr.c6
-rw-r--r--drivers/i2c/i2c-boardinfo.c2
-rw-r--r--drivers/i2c/i2c-core-acpi.c4
-rw-r--r--drivers/i2c/i2c-core-base.c4
-rw-r--r--drivers/i2c/i2c-core-of-prober.c2
-rw-r--r--drivers/i2c/i2c-dev.c4
-rw-r--r--drivers/i2c/i2c-mux.c2
-rw-r--r--drivers/i2c/i2c-smbus.c2
-rw-r--r--drivers/i2c/i2c-stub.c2
30 files changed, 41 insertions, 41 deletions
diff --git a/drivers/i2c/busses/i2c-cp2615.c b/drivers/i2c/busses/i2c-cp2615.c
index b9a86eb10cc2..e2d7cd2390fc 100644
--- a/drivers/i2c/busses/i2c-cp2615.c
+++ b/drivers/i2c/busses/i2c-cp2615.c
@@ -124,7 +124,7 @@ static int cp2615_check_status(enum cp2615_i2c_status status)
static int
cp2615_i2c_send(struct usb_interface *usbif, struct cp2615_i2c_transfer *i2c_w)
{
- struct cp2615_iop_msg *msg = kzalloc_obj(*msg, GFP_KERNEL);
+ struct cp2615_iop_msg *msg = kzalloc_obj(*msg);
struct usb_device *usbdev = interface_to_usbdev(usbif);
int res = cp2615_init_i2c_msg(msg, i2c_w);
@@ -143,7 +143,7 @@ cp2615_i2c_recv(struct usb_interface *usbif, unsigned char tag, void *buf)
struct cp2615_i2c_transfer_result *i2c_r;
int res;
- msg = kzalloc_obj(*msg, GFP_KERNEL);
+ msg = kzalloc_obj(*msg);
if (!msg)
return -ENOMEM;
@@ -171,7 +171,7 @@ cp2615_i2c_recv(struct usb_interface *usbif, unsigned char tag, void *buf)
/* Checks if the IOP is functional by querying the part's ID */
static int cp2615_check_iop(struct usb_interface *usbif)
{
- struct cp2615_iop_msg *msg = kzalloc_obj(*msg, GFP_KERNEL);
+ struct cp2615_iop_msg *msg = kzalloc_obj(*msg);
struct cp2615_iop_accessory_info *info = (struct cp2615_iop_accessory_info *)&msg->data;
struct usb_device *usbdev = interface_to_usbdev(usbif);
int res = cp2615_init_iop_msg(msg, iop_GetAccessoryInfo, NULL, 0);
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index dbe90974167a..2cb6a233d313 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -636,7 +636,7 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
struct cpm_i2c *cpm;
const u32 *data;
- cpm = kzalloc_obj(struct cpm_i2c, GFP_KERNEL);
+ cpm = kzalloc_obj(struct cpm_i2c);
if (!cpm)
return -ENOMEM;
diff --git a/drivers/i2c/busses/i2c-designware-amdpsp.c b/drivers/i2c/busses/i2c-designware-amdpsp.c
index c4d3b0ee6f4d..186f9b9f48b4 100644
--- a/drivers/i2c/busses/i2c-designware-amdpsp.c
+++ b/drivers/i2c/busses/i2c-designware-amdpsp.c
@@ -93,7 +93,7 @@ static int psp_send_i2c_req(enum psp_i2c_req_type i2c_req_type)
int status, ret;
/* Allocate command-response buffer */
- req = kzalloc_obj(*req, GFP_KERNEL);
+ req = kzalloc_obj(*req);
if (!req)
return -ENOMEM;
diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c
index ba0a2e03f490..077b093ba834 100644
--- a/drivers/i2c/busses/i2c-diolan-u2c.c
+++ b/drivers/i2c/busses/i2c-diolan-u2c.c
@@ -445,7 +445,7 @@ static int diolan_u2c_probe(struct usb_interface *interface,
return -ENODEV;
/* allocate memory for our device state and initialize it */
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (dev == NULL) {
ret = -ENOMEM;
goto error;
diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index 65ac713e8a84..f83238868802 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -720,7 +720,7 @@ static int pch_i2c_probe(struct pci_dev *pdev,
pch_pci_dbg(pdev, "Entered.\n");
- adap_info = kzalloc_obj(struct adapter_info, GFP_KERNEL);
+ adap_info = kzalloc_obj(struct adapter_info);
if (adap_info == NULL)
return -ENOMEM;
diff --git a/drivers/i2c/busses/i2c-fsi.c b/drivers/i2c/busses/i2c-fsi.c
index 77b4129e1ee6..82c87e04ac6f 100644
--- a/drivers/i2c/busses/i2c-fsi.c
+++ b/drivers/i2c/busses/i2c-fsi.c
@@ -707,7 +707,7 @@ static int fsi_i2c_probe(struct fsi_device *fsi_dev)
if (!of_device_is_available(np))
continue;
- port = kzalloc_obj(*port, GFP_KERNEL);
+ port = kzalloc_obj(*port);
if (!port) {
of_node_put(np);
break;
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
index ddea5847f0c5..a53b4bb7c3c0 100644
--- a/drivers/i2c/busses/i2c-highlander.c
+++ b/drivers/i2c/busses/i2c-highlander.c
@@ -365,7 +365,7 @@ static int highlander_i2c_probe(struct platform_device *pdev)
return -ENODEV;
}
- dev = kzalloc_obj(struct highlander_i2c_dev, GFP_KERNEL);
+ dev = kzalloc_obj(struct highlander_i2c_dev);
if (unlikely(!dev))
return -ENOMEM;
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index ca2534bba932..7c70e8bda24e 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -687,7 +687,7 @@ static int iic_probe(struct platform_device *ofdev)
const u32 *freq;
int ret;
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev)
return -ENOMEM;
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index f5c1d2191c98..4c67c5d18f34 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -415,13 +415,13 @@ iop3xx_i2c_probe(struct platform_device *pdev)
struct i2c_adapter *new_adapter;
struct i2c_algo_iop3xx_data *adapter_data;
- new_adapter = kzalloc_obj(struct i2c_adapter, GFP_KERNEL);
+ new_adapter = kzalloc_obj(struct i2c_adapter);
if (!new_adapter) {
ret = -ENOMEM;
goto out;
}
- adapter_data = kzalloc_obj(struct i2c_algo_iop3xx_data, GFP_KERNEL);
+ adapter_data = kzalloc_obj(struct i2c_algo_iop3xx_data);
if (!adapter_data) {
ret = -ENOMEM;
goto free_adapter;
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index b673206313fc..7064fab81eac 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -359,7 +359,7 @@ static int nforce2_probe(struct pci_dev *dev, const struct pci_device_id *id)
int res1, res2;
/* we support 2 SMBus adapters */
- smbuses = kzalloc_objs(struct nforce2_smbus, 2, GFP_KERNEL);
+ smbuses = kzalloc_objs(struct nforce2_smbus, 2);
if (!smbuses)
return -ENOMEM;
pci_set_drvdata(dev, smbuses);
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c
index 5ae1c7f8b9b5..e438ec8175d9 100644
--- a/drivers/i2c/busses/i2c-parport.c
+++ b/drivers/i2c/busses/i2c-parport.c
@@ -288,7 +288,7 @@ static void i2c_parport_attach(struct parport *port)
return;
}
- adapter = kzalloc_obj(struct i2c_par, GFP_KERNEL);
+ adapter = kzalloc_obj(struct i2c_par);
if (!adapter)
return;
memset(&i2c_parport_cb, 0, sizeof(i2c_parport_cb));
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index e159a9aed41f..7b6a4e201be4 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -919,7 +919,7 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
struct i2c_piix4_adapdata *adapdata;
int retval;
- adap = kzalloc_obj(*adap, GFP_KERNEL);
+ adap = kzalloc_obj(*adap);
if (adap == NULL) {
release_region(smba, SMBIOSIZE);
return -ENOMEM;
@@ -930,7 +930,7 @@ static int piix4_add_adapter(struct pci_dev *dev, unsigned short smba,
adap->algo = sb800_main ? &piix4_smbus_algorithm_sb800
: &smbus_algorithm;
- adapdata = kzalloc_obj(*adapdata, GFP_KERNEL);
+ adapdata = kzalloc_obj(*adapdata);
if (adapdata == NULL) {
kfree(adap);
release_region(smba, SMBIOSIZE);
diff --git a/drivers/i2c/busses/i2c-pxa-pci.c b/drivers/i2c/busses/i2c-pxa-pci.c
index c80a054fc4e9..dbd542300f80 100644
--- a/drivers/i2c/busses/i2c-pxa-pci.c
+++ b/drivers/i2c/busses/i2c-pxa-pci.c
@@ -112,7 +112,7 @@ static int ce4100_i2c_probe(struct pci_dev *dev,
dev_err(&dev->dev, "Missing device tree node.\n");
return -EINVAL;
}
- sds = kzalloc_obj(*sds, GFP_KERNEL);
+ sds = kzalloc_obj(*sds);
if (!sds)
return -ENOMEM;
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c
index c10ad0677949..324a63efa1ab 100644
--- a/drivers/i2c/busses/i2c-scmi.c
+++ b/drivers/i2c/busses/i2c-scmi.c
@@ -359,7 +359,7 @@ static int smbus_cmi_probe(struct platform_device *device)
struct acpi_smbus_cmi *smbus_cmi;
int ret;
- smbus_cmi = kzalloc_obj(struct acpi_smbus_cmi, GFP_KERNEL);
+ smbus_cmi = kzalloc_obj(struct acpi_smbus_cmi);
if (!smbus_cmi)
return -ENOMEM;
diff --git a/drivers/i2c/busses/i2c-sh7760.c b/drivers/i2c/busses/i2c-sh7760.c
index dcdf56398f70..ba0cbb36ab15 100644
--- a/drivers/i2c/busses/i2c-sh7760.c
+++ b/drivers/i2c/busses/i2c-sh7760.c
@@ -443,7 +443,7 @@ static int sh7760_i2c_probe(struct platform_device *pdev)
goto out0;
}
- id = kzalloc_obj(*id, GFP_KERNEL);
+ id = kzalloc_obj(*id);
if (!id) {
ret = -ENOMEM;
goto out0;
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c
index 9572357cc177..b4ca256a0aa9 100644
--- a/drivers/i2c/busses/i2c-simtec.c
+++ b/drivers/i2c/busses/i2c-simtec.c
@@ -64,7 +64,7 @@ static int simtec_i2c_probe(struct platform_device *dev)
int size;
int ret;
- pd = kzalloc_obj(struct simtec_i2c_data, GFP_KERNEL);
+ pd = kzalloc_obj(struct simtec_i2c_data);
if (pd == NULL)
return -ENOMEM;
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index e2388862f29e..70cb5822bf17 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -544,7 +544,7 @@ static int stm32f7_i2c_compute_timing(struct stm32f7_i2c_dev *i2c_dev,
if (((sdadel >= sdadel_min) &&
(sdadel <= sdadel_max)) &&
(p != p_prev)) {
- v = kmalloc_obj(*v, GFP_KERNEL);
+ v = kmalloc_obj(*v);
if (!v) {
ret = -ENOMEM;
goto exit;
diff --git a/drivers/i2c/busses/i2c-taos-evm.c b/drivers/i2c/busses/i2c-taos-evm.c
index e8a89b7d2174..debaf5189a83 100644
--- a/drivers/i2c/busses/i2c-taos-evm.c
+++ b/drivers/i2c/busses/i2c-taos-evm.c
@@ -203,7 +203,7 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv)
char *name;
int err;
- taos = kzalloc_obj(struct taos_data, GFP_KERNEL);
+ taos = kzalloc_obj(struct taos_data);
if (!taos) {
err = -ENOMEM;
goto exit;
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c
index ab021042901b..9ef495f88ef2 100644
--- a/drivers/i2c/busses/i2c-tiny-usb.c
+++ b/drivers/i2c/busses/i2c-tiny-usb.c
@@ -55,7 +55,7 @@ static int usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
struct i2c_msg *pmsg;
int i, ret;
- pstatus = kmalloc_obj(*pstatus, GFP_KERNEL);
+ pstatus = kmalloc_obj(*pstatus);
if (!pstatus)
return -ENOMEM;
@@ -123,7 +123,7 @@ static u32 usb_func(struct i2c_adapter *adapter)
__le32 *pfunc;
u32 ret;
- pfunc = kmalloc_obj(*pfunc, GFP_KERNEL);
+ pfunc = kmalloc_obj(*pfunc);
/* get functionality from adapter */
if (!pfunc || usb_read(adapter, CMD_GET_FUNC, 0, 0, pfunc,
@@ -233,7 +233,7 @@ static int i2c_tiny_usb_probe(struct usb_interface *interface,
dev_dbg(&interface->dev, "probing usb device\n");
/* allocate memory for our device state and initialize it */
- dev = kzalloc_obj(*dev, GFP_KERNEL);
+ dev = kzalloc_obj(*dev);
if (!dev)
goto error;
diff --git a/drivers/i2c/busses/i2c-virtio.c b/drivers/i2c/busses/i2c-virtio.c
index 01ef98e90243..7b0b0bff8000 100644
--- a/drivers/i2c/busses/i2c-virtio.c
+++ b/drivers/i2c/busses/i2c-virtio.c
@@ -139,7 +139,7 @@ static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
struct virtio_i2c_req *reqs;
int count;
- reqs = kzalloc_objs(*reqs, num, GFP_KERNEL);
+ reqs = kzalloc_objs(*reqs, num);
if (!reqs)
return -ENOMEM;
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 1c76aef0a423..0cd0a18a7082 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -418,7 +418,7 @@ static struct scx200_acb_iface *scx200_create_iface(const char *text,
struct scx200_acb_iface *iface;
struct i2c_adapter *adapter;
- iface = kzalloc_obj(*iface, GFP_KERNEL);
+ iface = kzalloc_obj(*iface);
if (!iface)
return NULL;
diff --git a/drivers/i2c/i2c-atr.c b/drivers/i2c/i2c-atr.c
index 8e3fe365caaf..ea6bfa67b518 100644
--- a/drivers/i2c/i2c-atr.c
+++ b/drivers/i2c/i2c-atr.c
@@ -137,7 +137,7 @@ static struct i2c_atr_alias_pool *i2c_atr_alloc_alias_pool(size_t num_aliases, b
struct i2c_atr_alias_pool *alias_pool;
int ret;
- alias_pool = kzalloc_obj(*alias_pool, GFP_KERNEL);
+ alias_pool = kzalloc_obj(*alias_pool);
if (!alias_pool)
return ERR_PTR(-ENOMEM);
@@ -183,7 +183,7 @@ static struct i2c_atr_alias_pair *i2c_atr_create_c2a(struct i2c_atr_chan *chan,
lockdep_assert_held(&chan->alias_pairs_lock);
- c2a = kzalloc_obj(*c2a, GFP_KERNEL);
+ c2a = kzalloc_obj(*c2a);
if (!c2a)
return NULL;
@@ -800,7 +800,7 @@ int i2c_atr_add_adapter(struct i2c_atr *atr, struct i2c_atr_adap_desc *desc)
return -EEXIST;
}
- chan = kzalloc_obj(*chan, GFP_KERNEL);
+ chan = kzalloc_obj(*chan);
if (!chan)
return -ENOMEM;
diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c
index 31fcc051bf20..735fd13fefc4 100644
--- a/drivers/i2c/i2c-boardinfo.c
+++ b/drivers/i2c/i2c-boardinfo.c
@@ -61,7 +61,7 @@ int i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsig
for (status = 0; len; len--, info++) {
struct i2c_devinfo *devinfo;
- devinfo = kzalloc_obj(*devinfo, GFP_KERNEL);
+ devinfo = kzalloc_obj(*devinfo);
if (!devinfo) {
pr_debug("i2c-core: can't register boardinfo!\n");
status = -ENOMEM;
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 5b16d76a5bc2..2cbd31f77667 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -683,7 +683,7 @@ i2c_acpi_space_handler(u32 function, acpi_physical_address command,
if (ACPI_FAILURE(ret))
return ret;
- client = kzalloc_obj(*client, GFP_KERNEL);
+ client = kzalloc_obj(*client);
if (!client) {
ret = AE_NO_MEMORY;
goto err;
@@ -793,7 +793,7 @@ int i2c_acpi_install_space_handler(struct i2c_adapter *adapter)
if (!handle)
return -ENODEV;
- data = kzalloc_obj(struct i2c_acpi_handler_data, GFP_KERNEL);
+ data = kzalloc_obj(struct i2c_acpi_handler_data);
if (!data)
return -ENOMEM;
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index 91b388070525..9c46147e3506 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -964,7 +964,7 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf
bool need_put = false;
int status;
- client = kzalloc_obj(*client, GFP_KERNEL);
+ client = kzalloc_obj(*client);
if (!client)
return ERR_PTR(-ENOMEM);
@@ -2529,7 +2529,7 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver)
return 0;
/* Set up a temporary client to help detect callback */
- temp_client = kzalloc_obj(*temp_client, GFP_KERNEL);
+ temp_client = kzalloc_obj(*temp_client);
if (!temp_client)
return -ENOMEM;
diff --git a/drivers/i2c/i2c-core-of-prober.c b/drivers/i2c/i2c-core-of-prober.c
index 8c820d70846a..6a82b03809d4 100644
--- a/drivers/i2c/i2c-core-of-prober.c
+++ b/drivers/i2c/i2c-core-of-prober.c
@@ -63,7 +63,7 @@ static int i2c_of_probe_enable_node(struct device *dev, struct device_node *node
dev_dbg(dev, "Enabling %pOF\n", node);
- struct of_changeset *ocs __free(kfree) = kzalloc_obj(*ocs, GFP_KERNEL);
+ struct of_changeset *ocs __free(kfree) = kzalloc_obj(*ocs);
if (!ocs)
return -ENOMEM;
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index e4ac9f2df8d5..e0aec8ee2dee 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -74,7 +74,7 @@ static struct i2c_dev *get_free_i2c_dev(struct i2c_adapter *adap)
return ERR_PTR(-ENODEV);
}
- i2c_dev = kzalloc_obj(*i2c_dev, GFP_KERNEL);
+ i2c_dev = kzalloc_obj(*i2c_dev);
if (!i2c_dev)
return ERR_PTR(-ENOMEM);
i2c_dev->adap = adap;
@@ -612,7 +612,7 @@ static int i2cdev_open(struct inode *inode, struct file *file)
* or I2C core code!! It just holds private copies of addressing
* information and maybe a PEC flag.
*/
- client = kzalloc_obj(*client, GFP_KERNEL);
+ client = kzalloc_obj(*client);
if (!client) {
i2c_put_adapter(adap);
return -ENOMEM;
diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index 2e7b4073a4df..681a201c239b 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -277,7 +277,7 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
return -EINVAL;
}
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c
index 14e45590e97e..bc7bd55e6370 100644
--- a/drivers/i2c/i2c-smbus.c
+++ b/drivers/i2c/i2c-smbus.c
@@ -319,7 +319,7 @@ struct i2c_client *i2c_new_slave_host_notify_device(struct i2c_adapter *adapter)
struct i2c_client *client;
int ret;
- status = kzalloc_obj(struct i2c_slave_host_notify_status, GFP_KERNEL);
+ status = kzalloc_obj(struct i2c_slave_host_notify_status);
if (!status)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/i2c/i2c-stub.c b/drivers/i2c/i2c-stub.c
index 1d7d105c5643..fbb0db41b10e 100644
--- a/drivers/i2c/i2c-stub.c
+++ b/drivers/i2c/i2c-stub.c
@@ -372,7 +372,7 @@ static int __init i2c_stub_init(void)
/* Allocate memory for all chips at once */
stub_chips_nr = i;
- stub_chips = kzalloc_objs(struct stub_chip, stub_chips_nr, GFP_KERNEL);
+ stub_chips = kzalloc_objs(struct stub_chip, stub_chips_nr);
if (!stub_chips)
return -ENOMEM;