X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fmbcs.c;fp=drivers%2Fchar%2Fmbcs.c;h=c268ee04b2aa31d40db4bf58931d1bef75f7b0ad;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=ac9cfa9701ea9003d0f440ec572e0eecaec7a1a3;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c index ac9cfa970..c268ee04b 100644 --- a/drivers/char/mbcs.c +++ b/drivers/char/mbcs.c @@ -699,7 +699,7 @@ static inline int mbcs_hw_init(struct mbcs_soft *soft) return 0; } -static ssize_t show_algo(struct device *dev, char *buf) +static ssize_t show_algo(struct device *dev, struct device_attribute *attr, char *buf) { struct cx_dev *cx_dev = to_cx_dev(dev); struct mbcs_soft *soft = cx_dev->soft; @@ -715,7 +715,7 @@ static ssize_t show_algo(struct device *dev, char *buf) (debug0 >> 32), (debug0 & 0xffffffff)); } -static ssize_t store_algo(struct device *dev, const char *buf, size_t count) +static ssize_t store_algo(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { int n; struct cx_dev *cx_dev = to_cx_dev(dev); @@ -750,7 +750,7 @@ static int mbcs_probe(struct cx_dev *dev, const struct cx_device_id *id) dev->soft = NULL; - soft = kcalloc(1, sizeof(struct mbcs_soft), GFP_KERNEL); + soft = kzalloc(sizeof(struct mbcs_soft), GFP_KERNEL); if (soft == NULL) return -ENOMEM; @@ -830,6 +830,9 @@ static int __init mbcs_init(void) { int rv; + if (!ia64_platform_is("sn2")) + return -ENODEV; + // Put driver into chrdevs[]. Get major number. rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops); if (rv < 0) {