Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d546fc3

Browse files
SuperKaliHeyMeco
authored andcommitted
WIP: adding some fixes in the drivers (torvalds#248)
* input: touchscreen: focaltech touch: Removing invalid function calls * Implement missing things on drivers * drm: panel: radxa 8hd display: Fix some wrong definitions * Rename reference for enable both modules
1 parent da7f733 commit d546fc3

File tree

8 files changed

+11
-22
lines changed

8 files changed

+11
-22
lines changed

drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
616616

617617
desc = of_device_get_match_data(dev);
618618
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
619-
MIPI_DSI_MODE_EOT_PACKET;
619+
MIPI_DSI_MODE_NO_EOT_PACKET;
620620
dsi->format = desc->format;
621621
dsi->lanes = desc->lanes;
622622

@@ -658,14 +658,12 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
658658
return ret;
659659
}
660660

661-
static int jadard_dsi_remove(struct mipi_dsi_device *dsi)
661+
static void jadard_dsi_remove(struct mipi_dsi_device *dsi)
662662
{
663663
struct jadard *jadard = mipi_dsi_get_drvdata(dsi);
664664

665665
mipi_dsi_detach(dsi);
666666
drm_panel_remove(&jadard->panel);
667-
668-
return 0;
669667
}
670668

671669
static const struct of_device_id jadard_of_match[] = {
@@ -688,4 +686,4 @@ module_mipi_dsi_driver(jadard_driver);
688686
MODULE_AUTHOR("Jagan Teki <[email protected]>");
689687
MODULE_AUTHOR("Stephen Chen <[email protected]>");
690688
MODULE_DESCRIPTION("Jadard JD9365DA-H3 WXGA DSI panel");
691-
MODULE_LICENSE("GPL");
689+
MODULE_LICENSE("GPL");

drivers/gpu/drm/panel/panel-radxa-display-8hd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static int radxa_display_8hd_probe(struct mipi_dsi_device *dsi)
368368

369369
desc = of_device_get_match_data(dev);
370370
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
371-
MIPI_DSI_MODE_EOT_PACKET;
371+
MIPI_DSI_MODE_NO_EOT_PACKET;
372372
dsi->format = desc->format;
373373
dsi->lanes = desc->lanes;
374374

@@ -410,14 +410,13 @@ static int radxa_display_8hd_probe(struct mipi_dsi_device *dsi)
410410
return ret;
411411
}
412412

413-
static int radxa_display_8hd_remove(struct mipi_dsi_device *dsi)
413+
static void radxa_display_8hd_remove(struct mipi_dsi_device *dsi)
414414
{
415415
struct jadard_jd9365da *jadard_jd9365da = mipi_dsi_get_drvdata(dsi);
416416

417417
mipi_dsi_detach(dsi);
418418
drm_panel_remove(&jadard_jd9365da->panel);
419419

420-
return 0;
421420
}
422421

423422
static const struct of_device_id radxa_display_8hd_of_match[] = {

drivers/iio/magnetometer/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# When adding new entries keep the list in alphabetical order
77
obj-$(CONFIG_AK8974) += ak8974.o
8-
obj-$(CONFIG_AK8975) += ak8975.o
8+
obj-$(CONFIG_AK8975) += ak8975_magn.o
99
obj-$(CONFIG_BMC150_MAGN) += bmc150_magn.o
1010
obj-$(CONFIG_BMC150_MAGN_I2C) += bmc150_magn_i2c.o
1111
obj-$(CONFIG_BMC150_MAGN_SPI) += bmc150_magn_spi.o

drivers/iio/magnetometer/ak8975.c renamed to drivers/iio/magnetometer/ak8975_magn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ MODULE_DEVICE_TABLE(of, ak8975_of_match);
10881088

10891089
static struct i2c_driver ak8975_driver = {
10901090
.driver = {
1091-
.name = "ak8975",
1091+
.name = "ak8975_magn",
10921092
.pm = pm_ptr(&ak8975_dev_pm_ops),
10931093
.of_match_table = ak8975_of_match,
10941094
.acpi_match_table = ak_acpi_match,

drivers/input/sensors/compass/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# Makefile for industrial I/O Magnetometer sensors
44
#
5-
obj-$(CONFIG_COMPASS_AK8975) += ak8975.o
5+
obj-$(CONFIG_COMPASS_AK8975) += ak8975_comp.o
66
obj-$(CONFIG_COMPASS_AK8963) += ak8963.o
77
obj-$(CONFIG_COMPASS_AK09911) += ak09911.o
88
obj-$(CONFIG_COMPASS_AK09918) += ak09918.o

drivers/input/sensors/compass/ak8975.c renamed to drivers/input/sensors/compass/ak8975_comp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ static int sensor_report_value(struct i2c_client *client)
244244
return -3;
245245
}
246246

247-
/* »¥³âµØ»º´æÊý¾Ý. */
247+
/* ����ػ�������. */
248248
mutex_lock(&sensor->data_mutex);
249249
memcpy(sensor->sensor_data, buffer, sensor->ops->read_len);
250250
mutex_unlock(&sensor->data_mutex);
@@ -593,7 +593,7 @@ static struct miscdevice compass_dev_device =
593593
};
594594

595595
static struct sensor_operate compass_akm8975_ops = {
596-
.name = "akm8975",
596+
.name = "akm8975_comp",
597597
.type = SENSOR_TYPE_COMPASS, //it is important
598598
.id_i2c = COMPASS_ID_AK8975,
599599
.read_reg = AK8975_REG_ST1, //read data
@@ -624,7 +624,7 @@ static void compass_akm8975_remove(struct i2c_client *client)
624624
}
625625

626626
static const struct i2c_device_id compass_akm8975_id[] = {
627-
{"ak8975", COMPASS_ID_AK8975},
627+
{"ak8975_comp", COMPASS_ID_AK8975},
628628
{}
629629
};
630630

drivers/input/touchscreen/focaltech_touch/focaltech_flash.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,6 @@ static int fts_read_file(char *file_name, u8 **file_buf)
10731073
char file_path[FILE_NAME_LENGTH] = { 0 };
10741074
struct file *filp = NULL;
10751075
struct inode *inode;
1076-
mm_segment_t old_fs;
10771076
loff_t pos;
10781077
loff_t file_len = 0;
10791078

@@ -1103,15 +1102,12 @@ static int fts_read_file(char *file_name, u8 **file_buf)
11031102
filp_close(filp, NULL);
11041103
return -ENOMEM;
11051104
}
1106-
old_fs = get_fs();
1107-
set_fs(KERNEL_DS);
11081105
pos = 0;
11091106
ret = vfs_read(filp, *file_buf, file_len , &pos);
11101107
if (ret < 0)
11111108
FTS_ERROR("read file fail");
11121109
FTS_INFO("file len:%d read len:%d pos:%d", (u32)file_len, ret, (u32)pos);
11131110
filp_close(filp, NULL);
1114-
set_fs(old_fs);
11151111

11161112
return ret;
11171113
}

drivers/input/touchscreen/focaltech_touch/focaltech_test/focaltech_test.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,6 @@ static int fts_test_save_test_data(char *file_name, char *data_buf, int len)
11811181
struct file *pfile = NULL;
11821182
char filepath[128];
11831183
loff_t pos;
1184-
mm_segment_t old_fs;
11851184

11861185
FTS_TEST_FUNC_ENTER();
11871186
memset(filepath, 0, sizeof(filepath));
@@ -1194,12 +1193,9 @@ static int fts_test_save_test_data(char *file_name, char *data_buf, int len)
11941193
return -EIO;
11951194
}
11961195

1197-
old_fs = get_fs();
1198-
set_fs(KERNEL_DS);
11991196
pos = 0;
12001197
vfs_write(pfile, data_buf, len, &pos);
12011198
filp_close(pfile, NULL);
1202-
set_fs(old_fs);
12031199

12041200
FTS_TEST_FUNC_EXIT();
12051201
return 0;

0 commit comments

Comments
 (0)