Skip to content

Commit f014d2b

Browse files
committed
Merge tag 'char-misc-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH: "Here are some small different driver fixes for 5.6-rc7: - binderfs fix, yet again - slimbus new device id added - hwtracing bugfixes for reported issues and a new device id All of these have been in linux-next with no reported issues" * tag 'char-misc-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: intel_th: pci: Add Elkhart Lake CPU support intel_th: Fix user-visible error codes intel_th: msu: Fix the unexpected state warning stm class: sys-t: Fix the use of time_after() slimbus: ngd: add v2.1.0 compatible binderfs: use refcount for binder control devices too
2 parents 3bd1482 + add492d commit f014d2b

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

drivers/android/binderfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ static int binderfs_binder_ctl_create(struct super_block *sb)
448448
inode->i_uid = info->root_uid;
449449
inode->i_gid = info->root_gid;
450450

451+
refcount_set(&device->ref, 1);
451452
device->binderfs_inode = inode;
452453
device->miscdev.minor = minor;
453454

drivers/hwtracing/intel_th/msu.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,6 @@ static int msc_win_set_lockout(struct msc_window *win,
718718

719719
if (old != expect) {
720720
ret = -EINVAL;
721-
dev_warn_ratelimited(msc_dev(win->msc),
722-
"expected lockout state %d, got %d\n",
723-
expect, old);
724721
goto unlock;
725722
}
726723

@@ -741,6 +738,10 @@ static int msc_win_set_lockout(struct msc_window *win,
741738
/* from intel_th_msc_window_unlock(), don't warn if not locked */
742739
if (expect == WIN_LOCKED && old == new)
743740
return 0;
741+
742+
dev_warn_ratelimited(msc_dev(win->msc),
743+
"expected lockout state %d, got %d\n",
744+
expect, old);
744745
}
745746

746747
return ret;
@@ -760,7 +761,7 @@ static int msc_configure(struct msc *msc)
760761
lockdep_assert_held(&msc->buf_mutex);
761762

762763
if (msc->mode > MSC_MODE_MULTI)
763-
return -ENOTSUPP;
764+
return -EINVAL;
764765

765766
if (msc->mode == MSC_MODE_MULTI) {
766767
if (msc_win_set_lockout(msc->cur_win, WIN_READY, WIN_INUSE))
@@ -1294,7 +1295,7 @@ static int msc_buffer_alloc(struct msc *msc, unsigned long *nr_pages,
12941295
} else if (msc->mode == MSC_MODE_MULTI) {
12951296
ret = msc_buffer_multi_alloc(msc, nr_pages, nr_wins);
12961297
} else {
1297-
ret = -ENOTSUPP;
1298+
ret = -EINVAL;
12981299
}
12991300

13001301
if (!ret) {
@@ -1530,7 +1531,7 @@ static ssize_t intel_th_msc_read(struct file *file, char __user *buf,
15301531
if (ret >= 0)
15311532
*ppos = iter->offset;
15321533
} else {
1533-
ret = -ENOTSUPP;
1534+
ret = -EINVAL;
15341535
}
15351536

15361537
put_count:

drivers/hwtracing/intel_th/pci.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
234234
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4da6),
235235
.driver_data = (kernel_ulong_t)&intel_th_2x,
236236
},
237+
{
238+
/* Elkhart Lake CPU */
239+
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4529),
240+
.driver_data = (kernel_ulong_t)&intel_th_2x,
241+
},
237242
{
238243
/* Elkhart Lake */
239244
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4b26),

drivers/hwtracing/stm/p_sys-t.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ static struct configfs_attribute *sys_t_policy_attrs[] = {
238238
static inline bool sys_t_need_ts(struct sys_t_output *op)
239239
{
240240
if (op->node.ts_interval &&
241-
time_after(op->ts_jiffies + op->node.ts_interval, jiffies)) {
241+
time_after(jiffies, op->ts_jiffies + op->node.ts_interval)) {
242242
op->ts_jiffies = jiffies;
243243

244244
return true;
@@ -250,8 +250,8 @@ static inline bool sys_t_need_ts(struct sys_t_output *op)
250250
static bool sys_t_need_clock_sync(struct sys_t_output *op)
251251
{
252252
if (op->node.clocksync_interval &&
253-
time_after(op->clocksync_jiffies + op->node.clocksync_interval,
254-
jiffies)) {
253+
time_after(jiffies,
254+
op->clocksync_jiffies + op->node.clocksync_interval)) {
255255
op->clocksync_jiffies = jiffies;
256256

257257
return true;

drivers/slimbus/qcom-ngd-ctrl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,9 @@ static const struct of_device_id qcom_slim_ngd_dt_match[] = {
13201320
{
13211321
.compatible = "qcom,slim-ngd-v1.5.0",
13221322
.data = &ngd_v1_5_offset_info,
1323+
},{
1324+
.compatible = "qcom,slim-ngd-v2.1.0",
1325+
.data = &ngd_v1_5_offset_info,
13231326
},
13241327
{}
13251328
};

0 commit comments

Comments
 (0)