Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 617876 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/dahdi/dahdi_dynamic.c (-1 / +1 lines)
Lines 467-473 static int _destroy_dynamic(struct dahdi_dynamic_span *dds) Link Here
467
467
468
	/* We shouldn't have more than the two references at this point.  If
468
	/* We shouldn't have more than the two references at this point.  If
469
	 * we do, there are probably channels that are still opened. */
469
	 * we do, there are probably channels that are still opened. */
470
	if (atomic_read(&d->kref.refcount) > 2) {
470
	if (refcount_read(&d->kref.refcount) > 2) {
471
		dynamic_put(d);
471
		dynamic_put(d);
472
		return -EBUSY;
472
		return -EBUSY;
473
	}
473
	}
(-)a/drivers/dahdi/xpp/xbus-core.c (-1 / +1 lines)
Lines 244-250 int refcount_xbus(xbus_t *xbus) Link Here
244
{
244
{
245
	struct kref *kref = &xbus->kref;
245
	struct kref *kref = &xbus->kref;
246
246
247
	return atomic_read(&kref->refcount);
247
	return refcount_read(&kref->refcount);
248
}
248
}
249
249
250
/*------------------------- Frame  Handling ------------------------*/
250
/*------------------------- Frame  Handling ------------------------*/
(-)a/drivers/dahdi/xpp/xbus-sysfs.c (-1 / +1 lines)
Lines 1000-1006 void xbus_sysfs_remove(xbus_t *xbus) Link Here
1000
		return;
1000
		return;
1001
	}
1001
	}
1002
	XBUS_DBG(DEVICES, xbus, "going to unregister: refcount=%d\n",
1002
	XBUS_DBG(DEVICES, xbus, "going to unregister: refcount=%d\n",
1003
		atomic_read(&astribank->kobj.kref.refcount));
1003
		refcount_read(&astribank->kobj.kref.refcount));
1004
	BUG_ON(dev_get_drvdata(astribank) != xbus);
1004
	BUG_ON(dev_get_drvdata(astribank) != xbus);
1005
	device_unregister(astribank);
1005
	device_unregister(astribank);
1006
	dev_set_drvdata(astribank, NULL);
1006
	dev_set_drvdata(astribank, NULL);
(-)a/drivers/dahdi/xpp/xpp_dahdi.c (-1 / +1 lines)
Lines 124-130 int refcount_xpd(xpd_t *xpd) Link Here
124
{
124
{
125
	struct kref *kref = &xpd->kref;
125
	struct kref *kref = &xpd->kref;
126
126
127
	return atomic_read(&kref->refcount);
127
	return refcount_read(&kref->refcount);
128
}
128
}
129
129
130
xpd_t *get_xpd(const char *msg, xpd_t *xpd)
130
xpd_t *get_xpd(const char *msg, xpd_t *xpd)
(-)a/include/dahdi/kernel.h (-1 / +3 lines)
Lines 1410-1415 static inline short dahdi_txtone_nextsample(struct dahdi_chan *ss) Link Here
1410
/*! Maximum audio mask */
1410
/*! Maximum audio mask */
1411
#define DAHDI_FORMAT_AUDIO_MASK	((1 << 16) - 1)
1411
#define DAHDI_FORMAT_AUDIO_MASK	((1 << 16) - 1)
1412
1412
1413
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
1414
#define refcount_read atomic_read
1413
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
1415
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
1414
1416
1415
/* DAHDI only was using the xxx_clear_bit variants. */
1417
/* DAHDI only was using the xxx_clear_bit variants. */
Lines 1539-1544 static inline int strcasecmp(const char *s1, const char *s2) Link Here
1539
#endif /* 2.6.31 */
1541
#endif /* 2.6.31 */
1540
#endif /* 3.10.0 */
1542
#endif /* 3.10.0 */
1541
#endif /* 3.16.0 */
1543
#endif /* 3.16.0 */
1544
#endif /* 4.11.0 */
1542
1545
1543
#ifndef DEFINE_SPINLOCK
1546
#ifndef DEFINE_SPINLOCK
1544
#define DEFINE_SPINLOCK(x)      spinlock_t x = SPIN_LOCK_UNLOCKED
1547
#define DEFINE_SPINLOCK(x)      spinlock_t x = SPIN_LOCK_UNLOCKED
1545
- 

Return to bug 617876