isl29003.c (371bb62158d53c1fc33e2fb9b6aeb9522caf6cf4) | isl29003.c (9b5db89ea4bfdbb23d4f85f3a7fbf2cd36d20146) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * isl29003.c - Linux kernel module for 4 * Intersil ISL29003 ambient light sensor 5 * | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * isl29003.c - Linux kernel module for 4 * Intersil ISL29003 ambient light sensor 5 * |
6 * See file:Documentation/misc-devices/isl29003 | 6 * See file:Documentation/misc-devices/isl29003.rst |
7 * 8 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> 9 * 10 * Based on code written by 11 * Rodolfo Giometti <giometti@linux.it> 12 * Eurotech S.p.A. <info@eurotech.it> 13 */ 14 --- 357 unchanged lines hidden (view full) --- 372 373/* 374 * I2C layer 375 */ 376 377static int isl29003_probe(struct i2c_client *client, 378 const struct i2c_device_id *id) 379{ | 7 * 8 * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> 9 * 10 * Based on code written by 11 * Rodolfo Giometti <giometti@linux.it> 12 * Eurotech S.p.A. <info@eurotech.it> 13 */ 14 --- 357 unchanged lines hidden (view full) --- 372 373/* 374 * I2C layer 375 */ 376 377static int isl29003_probe(struct i2c_client *client, 378 const struct i2c_device_id *id) 379{ |
380 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); | 380 struct i2c_adapter *adapter = client->adapter; |
381 struct isl29003_data *data; 382 int err = 0; 383 384 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE)) 385 return -EIO; 386 387 data = kzalloc(sizeof(struct isl29003_data), GFP_KERNEL); 388 if (!data) --- 86 unchanged lines hidden --- | 381 struct isl29003_data *data; 382 int err = 0; 383 384 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE)) 385 return -EIO; 386 387 data = kzalloc(sizeof(struct isl29003_data), GFP_KERNEL); 388 if (!data) --- 86 unchanged lines hidden --- |