| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 1998, 1999 Frodo Looijaard <frodol@dds.nl> and |
|---|
| 3 | 4 | * Philip Edelbrock <phil@netroedge.com> |
|---|
| 4 | 5 | * Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com> |
|---|
| 5 | 6 | * Copyright (C) 2003 IBM Corp. |
|---|
| 6 | 7 | * Copyright (C) 2004 Jean Delvare <jdelvare@suse.de> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 10 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 11 | | - * (at your option) any later version. |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 16 | | - * GNU General Public License for more details. |
|---|
| 17 | 8 | */ |
|---|
| 18 | 9 | |
|---|
| 19 | 10 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 85 | 76 | struct bin_attribute *bin_attr, |
|---|
| 86 | 77 | char *buf, loff_t off, size_t count) |
|---|
| 87 | 78 | { |
|---|
| 88 | | - struct i2c_client *client = to_i2c_client(kobj_to_dev(kobj)); |
|---|
| 79 | + struct i2c_client *client = kobj_to_i2c_client(kobj); |
|---|
| 89 | 80 | struct eeprom_data *data = i2c_get_clientdata(client); |
|---|
| 90 | 81 | u8 slice; |
|---|
| 91 | 82 | |
|---|
| .. | .. |
|---|
| 184 | 175 | } |
|---|
| 185 | 176 | } |
|---|
| 186 | 177 | |
|---|
| 178 | + /* Let the users know they are using deprecated driver */ |
|---|
| 179 | + dev_notice(&client->dev, |
|---|
| 180 | + "eeprom driver is deprecated, please use at24 instead\n"); |
|---|
| 181 | + |
|---|
| 187 | 182 | /* create the sysfs eeprom file */ |
|---|
| 188 | 183 | return sysfs_create_bin_file(&client->dev.kobj, &eeprom_attr); |
|---|
| 189 | 184 | } |
|---|