Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: adding some fixes in the drivers #248

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)

desc = of_device_get_match_data(dev);
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_EOT_PACKET;
MIPI_DSI_MODE_NO_EOT_PACKET;
dsi->format = desc->format;
dsi->lanes = desc->lanes;

Expand Down Expand Up @@ -658,14 +658,12 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
return ret;
}

static int jadard_dsi_remove(struct mipi_dsi_device *dsi)
static void jadard_dsi_remove(struct mipi_dsi_device *dsi)
{
struct jadard *jadard = mipi_dsi_get_drvdata(dsi);

mipi_dsi_detach(dsi);
drm_panel_remove(&jadard->panel);

return 0;
}

static const struct of_device_id jadard_of_match[] = {
Expand All @@ -688,4 +686,4 @@ module_mipi_dsi_driver(jadard_driver);
MODULE_AUTHOR("Jagan Teki <jagan@edgeble.ai>");
MODULE_AUTHOR("Stephen Chen <stephen@radxa.com>");
MODULE_DESCRIPTION("Jadard JD9365DA-H3 WXGA DSI panel");
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");
5 changes: 2 additions & 3 deletions drivers/gpu/drm/panel/panel-radxa-display-8hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ static int radxa_display_8hd_probe(struct mipi_dsi_device *dsi)

desc = of_device_get_match_data(dev);
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_EOT_PACKET;
MIPI_DSI_MODE_NO_EOT_PACKET;
dsi->format = desc->format;
dsi->lanes = desc->lanes;

Expand Down Expand Up @@ -410,14 +410,13 @@ static int radxa_display_8hd_probe(struct mipi_dsi_device *dsi)
return ret;
}

static int radxa_display_8hd_remove(struct mipi_dsi_device *dsi)
static void radxa_display_8hd_remove(struct mipi_dsi_device *dsi)
{
struct jadard_jd9365da *jadard_jd9365da = mipi_dsi_get_drvdata(dsi);

mipi_dsi_detach(dsi);
drm_panel_remove(&jadard_jd9365da->panel);

return 0;
}

static const struct of_device_id radxa_display_8hd_of_match[] = {
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/magnetometer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# When adding new entries keep the list in alphabetical order
obj-$(CONFIG_AK8974) += ak8974.o
obj-$(CONFIG_AK8975) += ak8975.o
obj-$(CONFIG_AK8975) += ak8975_magn.o
obj-$(CONFIG_BMC150_MAGN) += bmc150_magn.o
obj-$(CONFIG_BMC150_MAGN_I2C) += bmc150_magn_i2c.o
obj-$(CONFIG_BMC150_MAGN_SPI) += bmc150_magn_spi.o
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ MODULE_DEVICE_TABLE(of, ak8975_of_match);

static struct i2c_driver ak8975_driver = {
.driver = {
.name = "ak8975",
.name = "ak8975_magn",
.pm = pm_ptr(&ak8975_dev_pm_ops),
.of_match_table = ak8975_of_match,
.acpi_match_table = ak_acpi_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/sensors/compass/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Makefile for industrial I/O Magnetometer sensors
#
obj-$(CONFIG_COMPASS_AK8975) += ak8975.o
obj-$(CONFIG_COMPASS_AK8975) += ak8975_comp.o
obj-$(CONFIG_COMPASS_AK8963) += ak8963.o
obj-$(CONFIG_COMPASS_AK09911) += ak09911.o
obj-$(CONFIG_COMPASS_AK09918) += ak09918.o
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static int sensor_report_value(struct i2c_client *client)
return -3;
}

/* ����ػ�������. */
/* ����ػ�������. */
mutex_lock(&sensor->data_mutex);
memcpy(sensor->sensor_data, buffer, sensor->ops->read_len);
mutex_unlock(&sensor->data_mutex);
Expand Down Expand Up @@ -593,7 +593,7 @@ static struct miscdevice compass_dev_device =
};

static struct sensor_operate compass_akm8975_ops = {
.name = "akm8975",
.name = "akm8975_comp",
.type = SENSOR_TYPE_COMPASS, //it is important
.id_i2c = COMPASS_ID_AK8975,
.read_reg = AK8975_REG_ST1, //read data
Expand Down Expand Up @@ -624,7 +624,7 @@ static void compass_akm8975_remove(struct i2c_client *client)
}

static const struct i2c_device_id compass_akm8975_id[] = {
{"ak8975", COMPASS_ID_AK8975},
{"ak8975_comp", COMPASS_ID_AK8975},
{}
};

Expand Down
4 changes: 0 additions & 4 deletions drivers/input/touchscreen/focaltech_touch/focaltech_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,6 @@ static int fts_read_file(char *file_name, u8 **file_buf)
char file_path[FILE_NAME_LENGTH] = { 0 };
struct file *filp = NULL;
struct inode *inode;
mm_segment_t old_fs;
loff_t pos;
loff_t file_len = 0;

Expand Down Expand Up @@ -1103,15 +1102,12 @@ static int fts_read_file(char *file_name, u8 **file_buf)
filp_close(filp, NULL);
return -ENOMEM;
}
old_fs = get_fs();
set_fs(KERNEL_DS);
pos = 0;
ret = vfs_read(filp, *file_buf, file_len , &pos);
if (ret < 0)
FTS_ERROR("read file fail");
FTS_INFO("file len:%d read len:%d pos:%d", (u32)file_len, ret, (u32)pos);
filp_close(filp, NULL);
set_fs(old_fs);

return ret;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,6 @@ static int fts_test_save_test_data(char *file_name, char *data_buf, int len)
struct file *pfile = NULL;
char filepath[128];
loff_t pos;
mm_segment_t old_fs;

FTS_TEST_FUNC_ENTER();
memset(filepath, 0, sizeof(filepath));
Expand All @@ -1194,12 +1193,9 @@ static int fts_test_save_test_data(char *file_name, char *data_buf, int len)
return -EIO;
}

old_fs = get_fs();
set_fs(KERNEL_DS);
pos = 0;
vfs_write(pfile, data_buf, len, &pos);
filp_close(pfile, NULL);
set_fs(old_fs);

FTS_TEST_FUNC_EXIT();
return 0;
Expand Down